1

Attempting to resolve an issue that's been annoying me for a bit. I've distilled the symptoms into a set of reproducible steps:

  1. I have two sites, siteA, and siteB. They are both Node.js applications running on different ports (for the sake of example, 4567 and 4568)

  2. Both applications have their own file in sites_available (plus a symlink from sites_enabled), which contain the directives proxy_pass http://node_siteA/ and proxy_pass http://node_siteB/ respectively, inside of a location block.

  3. They also each have an upstream block (defined globally?):

    upstream node_siteA {               upstream node_siteB {
        server 127.0.0.1:4567;              server 127.0.0.1:4568;
    }                                   }
    

  4. Site A and Site B have nothing to do with each other.

  5. Yes, I am restarting (reloading, actually) nginx every time I make a change.

  6. If I take down site B and attempt to access it via the web, I am served site A.

Why is this?

Thoughts

  • Other times, when I create a new Site C, for example, nginx refuses to show me anything except "Welcome to nginx!" for ~5 minutes. This suggests a resolver timeout, perhaps?

  • When I access Site B after its config has been deleted, and it sends me to Site A, this sounds like nginx sending me to servers in a round-robin fashion...

2
  • Show the nginx configuration for each server. Oct 15, 2013 at 16:20
  • Hi @MichaelHampton, please take a look at this pastebin for SiteA. SiteB's config is exactly the same, only with "SiteB" substituted for "SiteA" Oct 15, 2013 at 16:23

1 Answer 1

0

Resolved here. Turns out the problem did not lie with nginx, but with CloudFlare.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .