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:
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user