Last active
March 4, 2021 07:11
-
-
Save mitchross/80a39e9c1eed0d813271e1a72a5bd5f1 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
# make sure that your dns has a cname set for organizr | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name shinobi.*; | |
include /config/nginx/ssl.conf; | |
client_max_body_size 0; | |
location / { | |
include /config/nginx/proxy.conf; | |
resolver 127.0.0.11 valid=30s; | |
set $upstream_app 192.168.1.223; | |
set $upstream_port 8080; | |
set $upstream_proto http; | |
proxy_pass $upstream_proto://$upstream_app:$upstream_port; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forward-Proto http; | |
proxy_set_header X-Nginx-Proxy true; | |
proxy_redirect off; | |
} | |
#this where socket io will be handling the request | |
location /socket.io/ { | |
resolver 127.0.0.11 valid=30s; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_pass "http://192.168.1.223:8080/socket.io/"; | |
} | |
# Optional redirect server errors to organizr error pages | |
#error_page 400 402 403 404 405 408 500 502 503 504 $scheme://$host/?error=$status; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment