53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
server {
|
|
server_name music-room.alchemy-studio.cn;
|
|
listen 443 ssl;
|
|
|
|
set $store_dir "/file_upload/"; # 文件存储路径
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
proxy_set_header Host music-room.alchemy-studio.cn;
|
|
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;
|
|
|
|
}
|
|
|
|
root /usr/local/openresty/nginx/html/music-room;
|
|
index index.html;
|
|
|
|
location /test_hello_world {
|
|
#设置content type
|
|
default_type text/html ;
|
|
# HTTP Status Code 和 内容
|
|
return 200 "hello world! ";
|
|
}
|
|
|
|
#Upload dir
|
|
location /append_file_output {
|
|
default_type "";
|
|
alias /file_upload;
|
|
autoidex on;
|
|
autoindex_exact_size off;
|
|
autoindex_localtime on;
|
|
}
|
|
|
|
#Upload image file
|
|
location /upload_image {
|
|
content_by_lua_file /usr/local/openresty/resty_funcs/upload_image.lua;
|
|
}
|
|
|
|
location /ws/ {
|
|
proxy_pass http://127.0.0.1:3001/;
|
|
proxy_set_header Host music-room.alchemy-studio.cn;
|
|
}
|
|
location /uc/ {
|
|
proxy_pass http://127.0.0.1:3000/;
|
|
proxy_set_header Host music-room.alchemy-studio.cn;
|
|
}
|
|
|
|
ssl_certificate /etc/letsencrypt/live/music-room.alchemy-studio.cn/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/music-room.alchemy-studio.cn/privkey.pem; # managed by Certbot
|
|
}
|