67 lines
1.6 KiB
Plaintext
67 lines
1.6 KiB
Plaintext
server {
|
||
listen 80;
|
||
server_name localhost;
|
||
|
||
gzip on;
|
||
gzip_static on;
|
||
gzip_min_length 1k;
|
||
gzip_comp_level 4;
|
||
gzip_proxied any;
|
||
gzip_types text/plain text/xml text/css;
|
||
gzip_vary on;
|
||
gzip_http_version 1.0;
|
||
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
||
|
||
# JNPF-START
|
||
#设置上传文件的大小
|
||
client_max_body_size 100m;
|
||
|
||
# #添加头部信息
|
||
proxy_set_header Cookie $http_cookie;
|
||
proxy_set_header X-Forwarded-Host $host;
|
||
proxy_connect_timeout 15s;
|
||
proxy_send_timeout 15s;
|
||
proxy_read_timeout 15s;
|
||
proxy_set_header X-Forwarded-Proto http;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
||
# #请求头总长度大于128k时使用large_client_header_buffers设置的缓存区
|
||
client_header_buffer_size 128k;
|
||
|
||
# #指令参数4为个数,128k为大小,默认是8k。申请4个128k。
|
||
large_client_header_buffers 4 128k;
|
||
|
||
# 前端主项目(jnpf-web)伪静态
|
||
location / {
|
||
root /www/jnpfsoft/jnpf-web;
|
||
index index.html;
|
||
try_files $uri $uri/ /index.html;
|
||
}
|
||
|
||
# 前端大屏(jnpf-web-datascreen)伪静态
|
||
location /DataV {
|
||
try_files $uri $uri/ /DataV/index.html;
|
||
}
|
||
|
||
# 主项目
|
||
location /api/ {
|
||
proxy_pass http://jnpf-java-boot.staging:30000;
|
||
}
|
||
|
||
# 报表(jnpf-datareport)接口
|
||
location /ReportServer/ {
|
||
proxy_pass http://jnpf-datareport.staging:30007/;
|
||
}
|
||
|
||
# 文件预览(jnpf-file-preview)
|
||
location /FileServer {
|
||
proxy_pass http://jnpf-file-preview.staging:30090;
|
||
}
|
||
|
||
location ~ /FileServer/*.*\.(js|css)?$ {
|
||
proxy_pass http://jnpf-file-preview.staging:30090;
|
||
}
|
||
|
||
}
|