You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
}
}