Files
resty_functions/conf/moicen/music-room.conf
T

132 lines
4.7 KiB
Plaintext

server {
server_name "music-room.moicen.com";
listen 443 ssl;
client_max_body_size 20M;
ssl_certificate /etc/letsencrypt/live/moicen.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/moicen.com/privkey.pem;
# 与 admin.moicen.com 保持一致:本域直接命中 /api/ngx/image/* Lua 时需 tmp、convert、又拍参数
set $tmp_file_dir "/file_upload";
set $task_server "http://127.0.0.1:8080";
set $huiwing_htyts_rust "127.0.0.1:3003";
set $huiwing_htyproc_rust "127.0.0.1:3004";
set $htyuc "http://127.0.0.1:3000";
set $resty_loc "/usr/local/openresty";
set $convert "/usr/bin/convert";
set $upyun_operator "moicen";
set $upyun_password "NyJ51zRwFApY9Wo9EHJMrb8GI9YtvpVN";
set $upyun_bucket "moicen";
set $upyun_directory "music-room";
set $upyun_domain "https://upyun.moicen.com";
set $upyun_cdn "https://upyun.moicen.com/";
set $wx_domain "wx.moicen.com";
set $upt_huiwings_secret "C5E4B01EC86A4CE8A84871EA2C826DD1";
set $upt_moicen_secret "339666FBB93C46D7B00D9F6E790C6C18";
set $upt_alchemy_secret "0D32E581A445404FA4C306709724FA07";
set $upt_duration 3600;
root /usr/local/openresty/nginx/html/music-room;
index index.html;
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 /api/v1/kc/ {
proxy_set_header Host $host;
proxy_set_header HtyHost $host;
proxy_pass http://127.0.0.1:3002/api/v1/kc/;
}
location /api/v1/clazz/ {
proxy_set_header Host $host;
proxy_set_header HtyHost $host;
proxy_pass http://127.0.0.1:3002/api/v1/clazz/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/v1/ws/ {
proxy_set_header Host $host;
proxy_set_header HtyHost $host;
proxy_pass http://127.0.0.1:3001/api/v1/ws/;
}
location /api/v1/uc/ {
proxy_set_header Host $host;
proxy_set_header HtyHost $host;
proxy_pass http://127.0.0.1:3000/api/v1/uc/;
}
location /api/v1/ts/ {
proxy_set_header Host $host;
proxy_set_header HtyHost $host;
proxy_pass http://127.0.0.1:3003/api/v1/ts/;
}
location /api/ngx/image/upload {
content_by_lua_file /usr/local/openresty/nginx/scripts/old_upload.lua;
}
location /api/ngx/image/wx_upload_single {
content_by_lua_file /usr/local/openresty/nginx/scripts/wx_upload_single.lua;
}
location /api/ngx/image/form_upload_to_combine {
content_by_lua_file /usr/local/openresty/nginx/scripts/form_upload_to_combine.lua;
}
location /api/ngx/image/wx_upload_to_combine {
content_by_lua_file /usr/local/openresty/nginx/scripts/wx_upload_to_combine.lua;
}
location /api/ngx/image/form_upload_to_compress {
content_by_lua_file /usr/local/openresty/nginx/scripts/form_upload_to_compress.lua;
}
location /api/ngx/image/combine {
content_by_lua_file /usr/local/openresty/nginx/scripts/combine.lua;
}
location /api/ngx/image/check {
content_by_lua_file /usr/local/openresty/nginx/scripts/check_file.lua;
}
location /api/ngx/image/upload_combined {
content_by_lua_file /usr/local/openresty/nginx/scripts/upload_combined_image.lua;
}
location /api/ngx/image/upyun_remove {
content_by_lua_file /usr/local/openresty/nginx/scripts/upyun_remove.lua;
}
location /api/ngx/audio/upload {
content_by_lua_file /usr/local/openresty/nginx/scripts/upload_audio.lua;
}
location /api/ngx/audio/convert {
content_by_lua_file /usr/local/openresty/nginx/scripts/convert_audio.lua;
}
location /api/ngx/upt {
content_by_lua_file /usr/local/openresty/nginx/scripts/upt.lua;
}
location /api/ngx/convert/test {
content_by_lua_file /usr/local/openresty/nginx/scripts/test.lua;
}
location / {
try_files $uri $uri/ /index.html;
proxy_set_header Host "music-room.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 "music-room.moicen.com";
location / {
return 301 https://$host$request_uri;
}
}