This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream my_upstream { #this line starts the list of real resources that exist behind the nginx server | |
server 127.0.0.1:1337; | |
server 127.0.0.1:1338; #these servers are used in the order they are defined, in round robin fashion. there's more ways of load balancing in the docs | |
server 127.0.0.1:1339 backup; #amazingness no.1, the keyword "backup" means that this server should only be used when the rest are non-responsive | |
keepalive 64; | |
} | |
server { | |
listen 80; | |
location /resource.html { #in my example the server only responds to requests for the file /request.html |