Skip to content

Instantly share code, notes, and snippets.

@robinsax
Last active August 4, 2018 19:26
Show Gist options
  • Save robinsax/2fb899cfe523dbe203ed6641d822d922 to your computer and use it in GitHub Desktop.
Save robinsax/2fb899cfe523dbe203ed6641d822d922 to your computer and use it in GitHub Desktop.
Template for canvas sites-enabled entries in nginx that are SSL certified with letsencrypt
server {
listen 80;
server_name DOMAIN.com;
rewrite ^/([^(?:.well\-known)].*) https://DOMAIN.com/$1 permanent;
location ~ /.well-known {
root PATH_TO_VERIFY_DIR;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/canvas.sock;
}
}
server {
listen 443 ssl;
server_name DOMAIN.com;
ssl_certificate /etc/letsencrypt/live/DOMAIN.com/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/DOMAIN.com/privkey.pem;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/canvas.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment