404 while Reverse proxy with ngnix

I’ve successfully published website to subdomain cms.mywebsite.com. It works perfectly well with CMS plan!

Now I’m trying to setup reverse proxy with ngnix, because I have up and running blog that is set up as subdirectory. So I’m trying to achieve:

/ - served by Webflow
/blog/ - served by local Wordpress

I’m getting 404 with my nginx config:

location / {
proxy_set_header Host cms.mywebsite.com;
proxy_ssl_server_name on;
proxy_pass https://cms.mywebsite.com$request_uri;
index index index.html;
 }

location /blog/ {
...php config...
}

I’ve tried mywebsite.com and mywebsite.com/terms - doesn’t work.

Please help

Hey Matteo

We don’t officially support reverse proxying webflow sites as there are a lot of potential things that can get in the way of it working, none of which are under our control. Having said that, we do have other customers who are doing this, so it can work - but we cannot provide support if things break.

Have you looked at the nginx logs? If they have any useful errors, that might help you track down the problem - however from my eyes, the reverse proxying portion of that nginx config looks entirely correct, so the problem may be coming from elsewhere in your config?

Hope that can help a little bit!

1 Like

Hi Nathan,

Thank you so much for pointing me to nginx logs.

There was problem with resolver:

no resolver defined to resolve....

After adding the following row, proxy works as expected:

#resolve using Google's DNS server to force DNS resolution and prevent caching of IPs
resolver 8.8.8.8;

Thanks again!

Hi, @Matteo!
Can you help me setting Reverse Proxy for my site, please!

Hello, @nathan!
I please, please need help with Reverse Proxy.
Server Managers from clients side astablished connection to “mysite”.com (no subdomain), and href set to /“k”, where “k” is Webflow site.
But it doesn’t work.