Streaming live at 10am (PST)

404 while Reverse proxy with ngnix

#1

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

#3

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
#4

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!