update nginx.conf
This commit is contained in:
+64
-24
@@ -24,6 +24,12 @@ http {
|
||||
# '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
#access_log logs/access.log main;
|
||||
log_format access-upstream '$time_iso8601|$request|$remote_addr|$upstream_response_time|$http_user_agent|$http_x_forwarded_for';
|
||||
map $time_iso8601 $logdate {
|
||||
'~^(?<ymd>\d{4}-\d{2}-\d{2})' $ymd;
|
||||
default 'date-not-found';
|
||||
}
|
||||
access_log logs/access-$logdate.log ;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
@@ -31,7 +37,7 @@ http {
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 1000s;
|
||||
proxy_read_timeout 1000s;
|
||||
client_max_body_size 50m;
|
||||
client_max_body_size 100m;
|
||||
#gzip on;
|
||||
# 企业端
|
||||
server {
|
||||
@@ -56,22 +62,15 @@ http {
|
||||
|
||||
location / {
|
||||
root D:/income_payments/UI_enterprise/enterprise;
|
||||
#try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
proxy_read_timeout 150s;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header 'Referrer-Policy' 'origin';
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
#add_header X-Frame-Options "ALLOW-FROM http://casa.catarc.org.cn:7008/";
|
||||
#add_header Strict-Transport-Security "max-age=16070400;";
|
||||
index index.html index.htm;
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^(.*)$ /index.html?s=$1 last;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
location /jero-boot {
|
||||
@@ -79,6 +78,9 @@ http {
|
||||
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 /jero-boot/actuator {
|
||||
return 403;
|
||||
}
|
||||
#会员系统的后端
|
||||
location /memberApi {
|
||||
@@ -87,6 +89,26 @@ http {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
#拦截 getcorsfile 接口
|
||||
location /preview/getCorsFile {
|
||||
return 403;
|
||||
}
|
||||
#拦截 deletefile 接口
|
||||
location /preview/deleteFile {
|
||||
return 403;
|
||||
}
|
||||
#防止 kkfile 执行恶意代码
|
||||
location /preview/index {
|
||||
return 403;
|
||||
}
|
||||
#拦截 deletefile 接口
|
||||
#通过 preview 接口允许访问 kkfile 预览
|
||||
location /preview {
|
||||
proxy_pass http://127.0.0.1:8092;
|
||||
proxy_set_header host $host;
|
||||
proxy_set_header x-real-ip $remote_addr;
|
||||
proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;
|
||||
}
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
@@ -137,6 +159,9 @@ http {
|
||||
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 /jero-boot/actuator {
|
||||
return 403;
|
||||
}
|
||||
# 请求大屏客户环境
|
||||
location /zxd {
|
||||
@@ -271,6 +296,7 @@ http {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
@@ -283,21 +309,35 @@ http {
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8092;
|
||||
server_name localhost;
|
||||
|
||||
#charset koi8-r;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
server {
|
||||
listen 8093;
|
||||
server_name localhost;
|
||||
|
||||
location ^~ /getCorsFile {
|
||||
return 404;
|
||||
index index.html index.htm;
|
||||
}
|
||||
location ^~ / {
|
||||
proxy_pass http://cwp.catarc.org.cn:8093/;
|
||||
}
|
||||
}
|
||||
#charset koi8-r;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
|
||||
location ^~ /getCorsFile {
|
||||
return 404;
|
||||
index index.html index.htm;
|
||||
}
|
||||
location /preview/getCorsFile {
|
||||
return 403;
|
||||
}
|
||||
#拦截 deletefile 接口
|
||||
location /preview/deleteFile {
|
||||
return 403;
|
||||
}
|
||||
#防止 kkfile 执行恶意代码
|
||||
location /preview/index {
|
||||
return 403;
|
||||
}
|
||||
#拦截 deletefile 接口
|
||||
location /index {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user