nginx: redirect www. to non-www

This commit is contained in:
link2xt
2024-01-06 18:48:21 +00:00
parent 449f8a014c
commit 542d63888a

View File

@@ -48,4 +48,12 @@ http {
# add cgi-bin support
include /usr/share/doc/fcgiwrap/examples/nginx.conf;
}
# Redirect www. to non-www
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name www.{{ config.domain_name }};
return 301 $scheme://{{ config.domain_name }}$request_uri;
}
}