##// END OF EJS Templates
Add https
Add https

File last commit:

r46:74b7da9f69c6
r46:74b7da9f69c6
Show More
app_ssl.conf
57 lines | 1.3 KiB | text/plain | TextLexer
# configuration
upstream mydjango {
server web:8080;
}
server {
listen 8000;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
#location / {
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_redirect off;
# proxy_pass http://mydjango;
# }
#location /static/ {
# alias /static/;
# }
}
server {
listen 443 ssl;
server_name http://jro-realtime.igp.gob.pe;
server_tokens off;
ssl_certificate /etc/letsencrypt/live/jro-realtime.igp.gob.pe/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/jro-realtime.igp.gob.pe/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass http://mydjango;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /static/ {
alias /static/;
}
}