Last active
April 28, 2018 11:25
-
-
Save nairihar/6d23f56b43e5de486522ceba148cbb75 to your computer and use it in GitHub Desktop.
NodeJS with NGINX Plus, medium, nginx plus conf
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 api { | |
zone api 64k; | |
server 127.0.0.1:3000; | |
server 127.0.0.1:3001; | |
} | |
server { | |
listen 8080; | |
location / { | |
proxy_pass http://api; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location /upstream_conf { | |
allow 10.0.0.0/8; # Allow access only from LAN | |
deny all; # Deny everyone else | |
upstream_conf; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment