webserver - nginx configuration for / only -
This is my current configuration in nginx: (folder 1 2 3 4 are just shortcuts for example) < Include pre> 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: Redirects now work if the server is unreachable. It looks like a job for: I did not test it, but there is something to explore. 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/; }
error_page 502 = http: / / ANYDOMAIN /;
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; }}
Comments
Post a Comment