Добавить 'www.conf'

This commit is contained in:
2021-02-21 05:45:00 +00:00
parent a86c838af0
commit 7c80f38852

14
www.conf Normal file
View File

@ -0,0 +1,14 @@
error_page 418 = @www;
set $www "0";
if ( $http_host ~* "^www\.") {
set $www "${www}1";
}
if ( $http_host ~* "^m\.") {
set $www "${www}2";
}
if ( $www = "0" ) {
return 418;
}
location @www {
rewrite ^ $scheme://www.$host$request_uri? permanent;
}