add ssl
This commit is contained in:
parent
277513d814
commit
1a1588ee79
@ -4,12 +4,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# ssl_certificate_key /ssl/private.pem;
|
ssl_certificate /etc/letsencrypt/live/randomsec.projektstudencki.pl/fullchain.pem; # managed by Certbot
|
||||||
# ssl_certificate /ssl/certs.pem;
|
ssl_certificate_key /etc/letsencrypt/live/randomsec.projektstudencki.pl/privkey.pem; # managed by Certbot
|
||||||
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
# ssl_protocols TLSv1.2;
|
|
||||||
# ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
|
ssl_protocols TLSv1.2;
|
||||||
# ssl_prefer_server_ciphers on;
|
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
# add_header Strict-Transport-Security max-age=31536000;
|
# add_header Strict-Transport-Security max-age=31536000;
|
||||||
}
|
}
|
@ -9,17 +9,20 @@ upstream django {
|
|||||||
server localhost:8080;
|
server localhost:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
# server {
|
server {
|
||||||
# listen 80 reuseport;
|
if ($host = randomsec.projektstudencki.pl) {
|
||||||
# server_name randomsec.projektstudencki.pl;
|
return 301 https://$host$request_uri;
|
||||||
# return 301 https://randomsec.projektstudencki.pl;
|
}
|
||||||
# }
|
listen 80 reuseport;
|
||||||
|
server_name randomsec.projektstudencki.pl
|
||||||
|
charset utf-8;
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
# configuration of the server
|
# configuration of the server
|
||||||
server {
|
server {
|
||||||
# the port your site will be served on
|
# the port your site will be served on
|
||||||
# listen 443 ssl http2 reuseport; #TODO change to 443
|
listen 443 ssl http2 reuseport;
|
||||||
listen 80 reuseport;
|
|
||||||
# the domain name it will serve for
|
# the domain name it will serve for
|
||||||
server_name randomsec.projektstudencki.pl
|
server_name randomsec.projektstudencki.pl
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
Loading…
Reference in New Issue
Block a user