mirror of
https://github.com/aykhans/series-robot-web.git
synced 2025-09-01 04:33:33 +00:00
Added ssl
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
upstream django_server{
|
||||
server django:8000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name series-notification.online;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name series-notification.online;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/series-notification.online/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/series-notification.online/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://django_server;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
location /django_static/ {
|
||||
alias /django_static/;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user