fix(moicen): add wx.moicen.com with WeChat MP_verify endpoints
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user