pref: update nginx config

This commit is contained in:
thehrz 2023-08-05 14:06:39 +08:00
parent 13e6d63d62
commit c4e49108c9
Signed by: thehrz
GPG Key ID: C84CBCE7D5F88855
3 changed files with 18 additions and 3 deletions

View File

@ -0,0 +1,6 @@
server {
listen 80;
listen [::]:80;
return 403;
}

View File

@ -1,10 +1,9 @@
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
server_name test.thehrz.net; server_name 19yuke2.cn;
location / { location / {
root /usr/local/nginx/html/; return 301 https://www.19yuke2.cn;
try_files $uri $uri/ /index.html;
} }
} }

10
nginx/conf.d/www.conf Normal file
View File

@ -0,0 +1,10 @@
server {
listen 80;
listen [::]:80;
server_name www.19yuke2.cn;
location / {
root /usr/local/nginx/html/;
try_files $uri $uri/ /index.html;
}
}