Last active
August 4, 2018 19:26
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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