Skip to content

Commit

Permalink
added nginx configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanshelly committed Jun 11, 2017
1 parent e1bcdf3 commit 11d592c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions nginx_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
server {
listen 80;
server_name bigbrothersees.me;

return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl;
server_name bigbrothersees.me;
root /home/nathan/webcam_web_code;

ssl_certificate /etc/letsencrypt/live/bigbrothersees.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/bigbrothersees.me/privkey.pem;

# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

location = / {
index index.html;
}

location / {
try_files $uri $uri.html =404;
}

location /post_image {
proxy_pass https://127.0.0.1:8000/post_image;
}

location ~* socket {
proxy_pass https://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}


location ~ /.well-known {
allow all;
}
}

0 comments on commit 11d592c

Please sign in to comment.