Created
September 7, 2018 06:45
-
-
Save olvrb/32f262d6eba13cda7c1268a8cbc34af0 to your computer and use it in GitHub Desktop.
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
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_yourdomain { | |
server 127.0.0.1:2368; | |
keepalive 8; | |
} | |
server { | |
listen 0.0.0.0:80; | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
# ssl_certificate path | |
# ssl_certificate_key path | |
# ssl_trusted_certificate path | |
server_name domain.example; | |
#access_log /var/log/nginx/yourdomain.log; | |
# and much more can be added, see nginx config options | |
client_max_body_size 512M; | |
location ~ \assets\css\.css { | |
add_header Content-Type text/css; | |
} | |
location ~ \assets\js\.js { | |
add_header Content-Type application/x-javascript; | |
} | |
location / { | |
include /etc/nginx/mime.types; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://app_yourdomain/; | |
proxy_redirect off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment