Created
July 6, 2020 20:28
-
-
Save RyanDsilva/d4e6023f1e033d0993faab0507a70ae9 to your computer and use it in GitHub Desktop.
Reverse Proxy + Load Balancing NGINX configuration
This file contains hidden or 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 nodejs { | |
server localhost:5000; | |
server localhost:5001; | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name SERVER_IP; | |
root /home/ryan; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
location / { | |
proxy_pass http://nodejs/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment