Last active
October 22, 2018 12:55
-
-
Save jatrost/428d3b8ef2a1a2b28062 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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 8443 ssl; | |
ssl_certificate /etc/ssl/private/mhn.yourcompany.com.pem; | |
ssl_certificate_key /etc/ssl/private/mhn.yourcompany.com.pem; | |
root /opt/honeymap/client; | |
index index.html index.htm; | |
server_name mhn.yourcompany.com; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} | |
location /data/ { | |
proxy_pass http://localhost:3000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
} | |
} |
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
server { | |
listen 80; | |
listen 443 ssl; | |
server_name mhn.yourcompany.com; | |
ssl_certificate /etc/ssl/private/mhn.yourcompany.com.pem; | |
ssl_certificate_key /etc/ssl/private/mhn.yourcompany.com.pem; | |
if ($ssl_protocol = "") { | |
rewrite ^ https://$host$request_uri? permanent; | |
} | |
location / { | |
try_files $uri @mhnserver; | |
} | |
root /opt/www; | |
location @mhnserver { | |
include uwsgi_params; | |
uwsgi_pass unix:/tmp/uwsgi.sock; | |
} | |
location /static { | |
alias /opt/mhn/server/mhn/static; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment