Advertisement
vokler

Untitled

Nov 16th, 2022 (edited)
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.99 KB | None | 0 0
  1. server {
  2.     server_name wishlistsprod.com;
  3.  
  4.     location = /favicon.ico { access_log off; log_not_found off; }
  5.     location /static/ {
  6.         root /home/vokler/wishlist-server/wishlist;
  7.     }
  8.  
  9.     location /media/ {
  10.         root /home/vokler/wishlist-server/wishlist;
  11.     }
  12.  
  13.     location / {
  14.         include proxy_params;
  15.         proxy_pass http://unix:/run/gunicorn.sock;
  16.     }
  17.  
  18.     listen 443 ssl; # managed by Certbot
  19.     ssl_certificate /etc/letsencrypt/live/wishlistsprod.com/fullchain.pem; # managed by Certbot
  20.     ssl_certificate_key /etc/letsencrypt/live/wishlistsprod.com/privkey.pem; # managed by Certbot
  21.     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  22.     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  23.  
  24. }
  25. server {
  26.     if ($host = wishlistsprod.com) {
  27.         return 301 https://$host$request_uri;
  28.     } # managed by Certbot
  29.  
  30.  
  31.     listen 80;
  32.     server_name wishlistsprod.com;
  33.     return 404; # managed by Certbot
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement