Skip to content

Instantly share code, notes, and snippets.

@rajasimon
Created January 7, 2023 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajasimon/358f6ba771eb6436dbe2bc67eabc7a64 to your computer and use it in GitHub Desktop.
Save rajasimon/358f6ba771eb6436dbe2bc67eabc7a64 to your computer and use it in GitHub Desktop.
Preview Card Nginx Configuration
server {
listen 80;
listen [::]:80;
server_name preview-card.com;
if ($scheme = “http”) {
return 301 https://$server_name$request_uri;
}
}
server {
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
client_max_body_size 75M;
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 128;
}
server_name preview-card.com;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/preview-card.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/preview-card.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment