1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Remove redirect to HTTPS, add redirect from www to non-www

This commit is contained in:
Maksym Pavlenko
2017-11-21 22:41:55 -08:00
parent 42ee2c681d
commit 979baad189
2 changed files with 20 additions and 18 deletions

View File

@ -41,20 +41,5 @@ http {
ssl_stapling_verify on;
ssl_ecdh_curve secp384r1;
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
# do not redirect requests letsencrypt
location /.well-known/ {}
# the default location redirects to https
location / {
return 301 https://$host$request_uri;
}
}
include /etc/nginx/conf.d/*.conf;
}

View File

@ -7,10 +7,27 @@ upstream backend {
}
server {
listen 443;
server_name _;
listen 80;
listen 443 ssl;
server_name www.podsync.net;
ssl_certificate SSL_CERT;
ssl_certificate_key SSL_KEY;
return 301 $scheme://podsync.net$request_uri;
}
server {
listen 80;
listen 443 ssl;
server_name podsync.net;
root /usr/share/nginx/html;
location /.well-known/ {}
ssl on;
ssl_certificate SSL_CERT;
ssl_certificate_key SSL_KEY;