60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
server {
|
|
server_name nodeai.world www.nodeai.world;
|
|
client_max_body_size 50m;
|
|
listen *:80;
|
|
listen *:443 ssl;
|
|
#ssl on;
|
|
|
|
# 静态文件夹和域名对应
|
|
root /data/nginx/nodeai.world;
|
|
index index.html index.htm;
|
|
|
|
# 日志文件名和域名对应
|
|
access_log /data/nginx/logs/nodeai.world.access.log;
|
|
error_log /data/nginx/logs/nodeai.world.error.log;
|
|
|
|
ssl_certificate cert/nodeai.worid.pem;
|
|
ssl_certificate_key cert/nodeai.worid.key;
|
|
|
|
location /upload {
|
|
root /data/nginx/;
|
|
index index.html;
|
|
}
|
|
|
|
location /api {
|
|
proxy_pass http://127.17.0.1:8102;
|
|
proxy_headers_hash_max_size 51200;
|
|
proxy_headers_hash_bucket_size 6400;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_buffering off;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
location /api/api {
|
|
proxy_pass http://127.17.0.1:8102/api;
|
|
proxy_headers_hash_max_size 51200;
|
|
proxy_headers_hash_bucket_size 6400;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_buffering off;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
location /zip {
|
|
alias /data/nginx/zip/;#此处定义映射文件位置
|
|
allow all;
|
|
autoindex on;
|
|
}
|
|
}
|