初始化提交
This commit is contained in:
110
nginx/sit-nginx.conf
Normal file
110
nginx/sit-nginx.conf
Normal file
@@ -0,0 +1,110 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
resolver 8.8.8.8 8.8.4.4 ipv6=on; # 配置 DNS 解析器
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
gzip_min_length 1k;
|
||||
gzip_buffers 4 16k;
|
||||
gzip_comp_level 2;
|
||||
|
||||
client_max_body_size 300M;
|
||||
|
||||
include /data/tengine/conf/vhosts/*.conf;
|
||||
|
||||
upstream backend {
|
||||
server 127.0.0.1:8080;
|
||||
#server 172.24.16.7:8080;
|
||||
#check interval=5000 rise=2 fall=5 timeout=1000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name sitadmin.deeplink.media;
|
||||
|
||||
ssl_certificate /data/tengine/conf/certificate/deeplink.media_bundle.crt;
|
||||
ssl_certificate_key /data/tengine/conf/certificate/deeplink.media.key;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
|
||||
|
||||
location / {
|
||||
root /data/tengine/html/fly_moon_web/dist;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /partner {
|
||||
root /data/tengine/html/fly_moon_web/dist;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
|
||||
location ^~ /sit-api {
|
||||
client_max_body_size 100m;
|
||||
proxy_pass http://backend;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /sit-api/system/common/file/uploadAttachment {
|
||||
client_max_body_size 288M; # 设置上传文件最大为 288MB
|
||||
client_body_buffer_size 1M; # 设置最大缓冲区为 1MB
|
||||
proxy_pass http://backend; # 后端服务地址
|
||||
proxy_set_header Host $host; # 转发请求的 Host
|
||||
proxy_set_header X-Real-IP $remote_addr; # 转发真实客户端 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 代理链
|
||||
# 可选超时配置
|
||||
proxy_connect_timeout 10s; # 连接后端超时时间
|
||||
proxy_send_timeout 300s; # 发送数据到后端的超时时间
|
||||
proxy_read_timeout 300s; # 读取后端响应的超时时间
|
||||
}
|
||||
|
||||
|
||||
location /sit-api/monitor/job {
|
||||
proxy_pass http://127.0.0.1:8050$uri;
|
||||
proxy_set_header Host $host;
|
||||
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;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /sit-api/monitor/jobLog {
|
||||
proxy_pass http://127.0.0.1:8050$uri;
|
||||
proxy_set_header Host $host;
|
||||
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;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name sitadmin.deeplink.media;
|
||||
# HTTP到HTTPS的重定向
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user