webserver - nginx configuration for / only -


This is my current configuration in nginx: (folder 1 2 3 4 are just shortcuts for example) < Include pre> place / folder1 {localfolder.conf; } Places / Folder 2 {include localfolder.conf; } Place / Folder 3 {include localfolder.conf; } Places / Folder 4 {include localfolder.conf; } Location / {proxy_pass http://192.168.0.250/; }

You can see that I / we redirect all calls to calls except columns 1 2 3 and 4. When I just call, it redirects to other webservers too. It works great until the other webserver is running.

My problem is, NGNX is not only running its local document (/ usr / share / nginx / www) / when another webserver is running.

I've read the docs but I do not have any idea how to get it ...

Thanks for your thoughts and help.

Edit:

I have added the following location to the configuration inside the "place /" bracket:

  error_page 502 = http: / / ANYDOMAIN /;   

Redirects now work if the server is unreachable.

It looks like a job for:

  upstream Fishing {server 192.168.0.250; # Try this first server local host backup; # If this is not the answer to the above} server {location / {proxy_pass http: // fishing; }}   

I did not test it, but there is something to explore.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -