Proxying and multiple nginx servers

Answer these questions to help the Community help you get started.

What is the domain name?

Have you searched for an answer?

Please share your search results url:

Describe the issue you are having:
my domain was working (multiple servers configured in nginx). i put the domain behind cloudflare, set the DNS, enabled proxying, and the requests go to the wrong server: they go to the default server rather than the one with the server name that matches the domain.

when i pause cloudflare, the domain works as expected (traffic goes to the right server).

What error message or number are you receiving?
403, but only because the default server configured on the host is not accessible from outside my netwok.

What steps have you taken to resolve the issue?

  1. checked access logs for the correct server ( and the default server to see where the requests are landing
  2. checked the http headers on the requests to see if anything looks wrong: the Host header does not appear to be set.

Was the site working with SSL prior to adding it to Cloudflare?

What are the steps to reproduce the error:

  1. enable the site on cloudflare
  2. access my domain
  3. get a 403 (outside my network)

Have you tried from another browser and/or incognito mode?

Are you using the Full (strict) encryption mode in Cloudflare?

no, it’s currently Flexible.

i just set it to Full, unpaused the site, and now it seems to be working. i can’t immediately see why that would be the case.

You should really be using Full (strict), as Full is not secure.

I assume that your nginx config only configures the server to listen on port 443, not 80.

1 Like

done. still works (phew!).

it does… when i had it listening on 80 with a redirect to the https version, i got “too many redirects” so i removed that stanza.

thanks so much!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.