Advertisement
Guest User

Untitled

a guest
Sep 26th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. server {
  2. # listen on port 80 (http)
  3. listen 80;
  4. server_name _;
  5. location / {
  6. # redirect any requests to the same URL but on https
  7. return 301 https://$host$request_uri;
  8. }
  9. }
  10. server {
  11. # listen on port 443 (https)
  12. listen 443 ssl;
  13. server_name www.jpilkington.com;
  14.  
  15. # location of the self-signed SSL certificate
  16. ssl_certificate /etc/letsencrypt/live/www.jpilkington.com/fullchain.pem;
  17. ssl_certificate_key /etc/letsencrypt/live/www.jpilkington.com/privkey.pem;
  18.  
  19. # write access and error logs to /var/log
  20. access_log /var/log/new_portfolio_access.log;
  21. error_log /var/log/new_portfolio_error.log;
  22. location /route/v1 {
  23. proxy_pass http://127.0.0.1:5001/route/v1;
  24. proxy_redirect off;
  25. proxy_set_header Host $host;
  26. proxy_set_header X-Real-IP $remote_addr;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. }
  29. location / {
  30. # forward application requests to the gunicorn server
  31. proxy_pass http://localhost:8000;
  32. proxy_redirect off;
  33. proxy_set_header Host $host;
  34. proxy_set_header X-Real-IP $remote_addr;
  35. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  36. }
  37. location /static {
  38. alias /root/www/static;
  39. expires 30d;
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement