Last active
April 10, 2018 23:33
-
-
Save robertz/421e92e254cfe438f599dca9a01ca7cf to your computer and use it in GitHub Desktop.
Production nginx config
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 backend { | |
server fullstack-node:3000; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
#access_log /var/log/nginx/host.access.log main; | |
location /api { | |
proxy_pass http://backend; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment