#user nobody;worker_processes 1;#error_log logserrorlog;#error_log logserrorlog notice;#error_log logserrorlog info;#pid logsnginxpid;events worker_connections 1024;http #oofs
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid;
events { worker_connections 1024; }
http {
#oofs 产品
server {
listen 30001;
server_name localhost;
error_page 497 https://$host$uri?$args;
proxy_set_header Host $host:30001;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_header_buffer_size 16k;
large_client_header_buffers 4 6m;
location = /index.html {
expires 0d;
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ /css/icon/style.css {
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
proxy_redirect off;
}
location ~ /(js|css)/(ofs|icon)/ {
root D:/Projects/oofs/ofs/src/main/resources/static;
proxy_ignore_headers Set-Cookie Cache-Control;
proxy_hide_header Cache-Control;
proxy_hide_header Set-Cookie;
expires 0d;
}
location = / {
expires 0d;
proxy_pass http://oofs;
proxy_redirect off;
}
location = /html/verifyPage.html {
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
}
location = /html/authorization.html {
proxy_pass http://oofs;
proxy_redirect off;
}
location = /css/icon/svgxuse.js {
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
proxy_redirect off;
}
location ~ /(documents) {
root D:/Projects/oofs/ofs/src/main/resources/static;
}
location ~ /images/changeLogLogo.svg {
root D:/Projects/oofs/ofs/src/main/resources/static;
}
location ~ /css/icon/SVG/ {
root D:/Projects/oofs/ofs/src/main/resources/static;
}
location ~ /images/documents/ {
root D:/Projects/oofs/ofs/src/main/resources/static;
}
location = /cron_qqe2_com.html {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ /asset/.+$ {
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
proxy_redirect off;
}
location ~ /js/lib/.+$ {
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
proxy_redirect off;
}
location ~ /js/ttx/.+$ {
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
proxy_redirect off;
}
location ~ /master/file/upload/Voucher/ {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ ^/(ofs.html|images/prod-logo.svg|images/prod-logo-colorful.svg) {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ ^/(cbt|api|rest|endpoint|userData)/.+$ {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ /rest/ {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ ^/(ams|js/ams|css/ams|images/ams)/.+$ {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ /css/icon/SVG/ {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ /js/js-xlsx/ {
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ /css/ofs/ {
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
proxy_redirect off;
}
location ~ ^/(js|css|images)/(ams|bms|datax|demo|ofs|oms|ots|kpi|scv|tms|tb|tf|wms|customization|sso-admin)/.+$ {
proxy_pass http://oofs;
proxy_redirect off;
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
add_header Cache-Control private;
if_modified_since off;
expires off;
etag off;
}
location ~ .*\.(html|gif|jpg|ico|jpeg|png|bmp|swf|js|json|css|woff|woff2|ttf|html|coffee|map|mp3|wav|svg|ttf)$ {
expires modified +2d;
root C:/ttx/nginx-1.20.2/webapps/ofs-1.7/release;
}
location ~ .*\.(js|css)?$
{
proxy_pass http://oofs;
proxy_redirect off;
}
location ~ ^/.+$ {
proxy_pass http://oofs;
}
location ~ ^/(WEB-INF)/ {
deny all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
原文地址: https://www.cveoy.top/t/topic/eEW3 著作权归作者所有。请勿转载和采集!