Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- # listen on port 80 (http)
- listen 80;
- server_name _;
- location / {
- # redirect any requests to the same URL but on https
- return 301 https://$host$request_uri;
- }
- }
- server {
- # listen on port 443 (https)
- listen 443 ssl;
- server_name www.jpilkington.com;
- # location of the self-signed SSL certificate
- ssl_certificate /etc/letsencrypt/live/www.jpilkington.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/www.jpilkington.com/privkey.pem;
- # write access and error logs to /var/log
- access_log /var/log/new_portfolio_access.log;
- error_log /var/log/new_portfolio_error.log;
- location /route/v1 {
- proxy_pass http://127.0.0.1:5001/route/v1;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- location / {
- # forward application requests to the gunicorn server
- proxy_pass http://localhost:8000;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- location /static {
- alias /root/www/static;
- expires 30d;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement