Skip to content

Commit

Permalink
Add example nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
kz26 committed Jan 2, 2018
1 parent 5baed5c commit 111add4
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions nginx/uchicagohvz.conf
@@ -0,0 +1,52 @@
server {
set $appdir "/home/uchicagohvz/app";

listen 443 ssl;
server_name www.uchicagohvz.org;
ssl_certificate ssl/uchicagohvz.org/cert.pem;
ssl_certificate_key ssl/uchicagohvz.org/private.key;
include ssl.conf;

location / {
proxy_pass http://127.0.0.1:8001;
client_max_body_size 32M;
access_log /var/log/nginx/uchicagohvz.log;
}

location /chat {
proxy_pass http://127.0.0.1:36452;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

location /static {
alias $appdir/uchicagohvz/static;
}

location /media {
alias $appdir/uchicagohvz/media;
}


location /favicon.ico {
alias $appdir/uchicagohvz/static/favicon.ico;
}

location /apple-touch-icon.png {
return 404;
}
}

server {
listen 80;
listen 443 ssl;
server_name uchicagohvz.org www.uchicagohvz.org;
ssl_certificate ssl/uchicagohvz.org/cert.pem;
ssl_certificate_key ssl/uchicagohvz.org/private.key;
include ssl.conf;

location / {
rewrite ^ https://www.uchicagohvz.org$uri permanent;
}
}

0 comments on commit 111add4

Please sign in to comment.