9c111492f1
Made-with: Cursor
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
server {
|
|
server_name "wx.moicen.com";
|
|
listen 443 ssl;
|
|
client_max_body_size 20M;
|
|
|
|
set $resty_loc "/usr/local/openresty";
|
|
|
|
ssl_certificate /etc/letsencrypt/live/moicen.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/moicen.com/privkey.pem;
|
|
|
|
root $resty_loc/nginx/html/music-room;
|
|
index index.html;
|
|
|
|
# 与 music-room.moicen.com 一致:微信校验该授权域名时必须 GET 到纯文本正文
|
|
location = /MP_verify_Jo6pKmy43wx7S5Sh.txt {
|
|
default_type text/plain;
|
|
return 200 'Jo6pKmy43wx7S5Sh';
|
|
}
|
|
|
|
location = /MP_verify_xDbyXEtPHigY8dCN.txt {
|
|
default_type text/plain;
|
|
return 200 'xDbyXEtPHigY8dCN';
|
|
}
|
|
|
|
location = /wy7of6ofMw.txt {
|
|
default_type text/plain;
|
|
return 200 'aa91a8d33359e82465dcc0aae9284b27';
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
proxy_set_header Host "wx.moicen.com";
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Host $remote_addr;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name "wx.moicen.com";
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|