mirror of
https://github.com/cwchristerw/tjas-infra
synced 2025-09-10 03:32:52 +00:00
Enable SSL in Nginx configuration
This commit is contained in:
@@ -19,7 +19,7 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|
||||||
#return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request_method !~ ^(GET|HEAD|POST)$ )
|
if ($request_method !~ ^(GET|HEAD|POST)$ )
|
||||||
@@ -28,43 +28,43 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# server {
|
server {
|
||||||
|
|
||||||
# listen 443 ssl default_server;
|
listen 443 ssl default_server;
|
||||||
# listen [::]:443 ssl default_server;
|
listen [::]:443 ssl default_server;
|
||||||
|
|
||||||
# server_name _;
|
server_name _;
|
||||||
|
|
||||||
# http2 on;
|
http2 on;
|
||||||
|
|
||||||
# ssl_certificate /etc/nginx/certs/pvjjk-1vos-niinisalo/fullchain.pem;
|
ssl_certificate /etc/nginx/certs/pvjjk-1vos-niinisalo/fullchain.pem;
|
||||||
# ssl_certificate_key /etc/nginx/certs/pvjjk-1vos-niinisalo/privkey.pem;
|
ssl_certificate_key /etc/nginx/certs/pvjjk-1vos-niinisalo/privkey.pem;
|
||||||
# ssl_protocols TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
# ssl_ecdh_curve X25519:prime256v1:secp384r1;
|
ssl_ecdh_curve X25519:prime256v1:secp384r1;
|
||||||
# ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
|
||||||
# ssl_prefer_server_ciphers off;
|
ssl_prefer_server_ciphers off;
|
||||||
# ssl_session_cache shared:SSL:20m;
|
ssl_session_cache shared:SSL:20m;
|
||||||
# ssl_session_timeout 180m;
|
ssl_session_timeout 180m;
|
||||||
|
|
||||||
# ssl_trusted_certificate /etc/nginx/certs/pvjjk-1vos-niinisalo/chain.pem;
|
ssl_trusted_certificate /etc/nginx/certs/pvjjk-1vos-niinisalo/chain.pem;
|
||||||
|
|
||||||
# expires off;
|
expires off;
|
||||||
# etag off;
|
etag off;
|
||||||
# if_modified_since off;
|
if_modified_since off;
|
||||||
|
|
||||||
# gzip on;
|
gzip on;
|
||||||
# gzip_min_length 1000;
|
gzip_min_length 1000;
|
||||||
# gzip_proxied any;
|
gzip_proxied any;
|
||||||
# gzip_types *;
|
gzip_types *;
|
||||||
# gunzip on;
|
gunzip on;
|
||||||
|
|
||||||
# location / {
|
location / {
|
||||||
# root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
# index index.html index.htm;
|
index index.html index.htm;
|
||||||
# }
|
}
|
||||||
|
|
||||||
# if ($request_method !~ ^(GET|HEAD|POST)$ )
|
if ($request_method !~ ^(GET|HEAD|POST)$ )
|
||||||
# {
|
{
|
||||||
# return 405;
|
return 405;
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
|
Reference in New Issue
Block a user