rename dir
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
server {
|
||||
# https://serverfault.com/questions/798734/use-variable-for-server-name-in-nginx#
|
||||
# server_name $servername;
|
||||
server_name "music-room.huiwings.cn";
|
||||
listen 443 ssl;
|
||||
client_max_body_size 10M;
|
||||
|
||||
set $resty_loc "/usr/local/openresty";
|
||||
|
||||
# disable in local test env
|
||||
ssl_certificate /etc/letsencrypt/live/huiwings.cn/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/huiwings.cn/privkey.pem; # managed by Certbot
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
proxy_set_header Host "music-room.huiwings.cn";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
# disable in local test env
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $remote_addr;
|
||||
}
|
||||
|
||||
root $resty_loc/nginx/html/music-room;
|
||||
index index.html;
|
||||
|
||||
# 公众号校验 炼金工坊
|
||||
location /MP_verify_Jo6pKmy43wx7S5Sh.txt {
|
||||
return 200 'Jo6pKmy43wx7S5Sh';
|
||||
}
|
||||
|
||||
# 公众号校验 慧添翼音乐教室
|
||||
location /MP_verify_xDbyXEtPHigY8dCN.txt {
|
||||
return 200 'xDbyXEtPHigY8dCN';
|
||||
}
|
||||
|
||||
# 小程序业务域名校验
|
||||
location /wy7of6ofMw.txt {
|
||||
return 200 'aa91a8d33359e82465dcc0aae9284b27';
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name "music-room.huiwings.cn";
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user