Commit d5bf12b8 authored by David Seaward's avatar David Seaward

update for HTTPS

parent 442341c2
# stored as /etc/nginx/sites-available/purist_account
# and symlink /etc/nginx/sites-enabled/purist_account
# naive redirect of HTTP to HTTPS
# deep links are ignored
server {
server_name example.com; # TODO: change domain
listen *:80;
listen [::]:80;
return 301 https://example.com; # TODO: change domain
}
# the upstream component nginx needs to connect to
upstream django {
server unix:/var/opt/purist/account/uwsgi.sock; # for a file socket
......@@ -8,11 +19,16 @@ upstream django {
# the main server block
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com; # TODO: change domain
# SSL configuration
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /path/to/fullchain.pem; # TODO: update path
ssl_certificate_key /path/to/privkey.pem; # TODO: update path
server_name example.com; # change this
charset utf-8;
# error_log /var/log/nginx/error.log debug; # optional
location /static/ {
alias /var/opt/purist/account/static/;
......
......@@ -27,7 +27,7 @@
<p>
<a href="https://plan.puri.st">plan</a> | <a href="https://code.puri.sm/purist">code</a> |
<a href="http://dev.comms.puri.st">test</a> | <a href="/admin/">admin</a>
<a href="https://dev.comms.puri.st">test</a> | <a href="/admin/">admin</a>
</p>
<p style="font-size: small">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment