Created
June 22, 2017 03:50
-
-
Save lulalachen/08640400fcf380b809307c656a7ee397 to your computer and use it in GitHub Desktop.
nginx setting
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
root@TimeXchange-stagging:/etc/nginx# cat sites-enabled/happybirthday.hangee.me | |
server { | |
listen 80; | |
server_name happybirthday.hangee.me; | |
root /www/hangee/docs; | |
location ~ (?:.+\/)((?:.+)\.(?:.+)) { | |
# $1 is the filename | |
try_files $uri /$1 /css/$1 =404; | |
} | |
location / { | |
try_files $uri /index.html; | |
} | |
} |
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
root@TimeXchange-stagging:/etc/nginx# cat sites-enabled/kanban.timexchange.cc | |
server { | |
listen 80; | |
server_name kanban.timexchange.cc; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
# Fix the "It appears that your reverse proxy set up is broken" error. | |
proxy_pass https://127.0.0.1:3030; | |
proxy_read_timeout 90; | |
} | |
location /ws { | |
proxy_http_version 1.1; | |
proxy_set_header Host $host; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Orgin ""; | |
proxy_pass https://127.0.0.1:3030; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment