split out virtual server for www subdomain

This commit is contained in:
Daniel Micay 2020-04-01 10:04:36 -04:00
parent bab50f098f
commit fcb0d84373

View File

@ -13,7 +13,27 @@ server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.grapheneos.org grapheneos.org;
server_name www.grapheneos.org;
ssl_certificate /etc/letsencrypt/live/grapheneos.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/grapheneos.org/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
ssl_trusted_certificate /etc/letsencrypt/live/grapheneos.org/chain.pem;
ssl_stapling on;
ssl_stapling_verify on;
root /var/empty;
return 301 https://grapheneos.org$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name grapheneos.org;
ssl_certificate /etc/letsencrypt/live/grapheneos.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/grapheneos.org/privkey.pem;
@ -30,10 +50,6 @@ server {
include /etc/nginx/snippets/security-headers.conf;
gzip_static on;
if ($host != "grapheneos.org") {
return 301 https://grapheneos.org$request_uri;
}
if ($request_uri ~ ^/(.*)\.html$) {
return 301 /$1;
}