nginx 配置文件(windows)
2021-06-15 17:04
标签:服务 size processes client rem wms pid www ane nginx 配置文件(windows) 标签:服务 size processes client rem wms pid www ane 原文地址:https://www.cnblogs.com/wangzhanhua/p/10362288.html
#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 {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 420;
#gzip on;
upstream base{
server **.**.**.**:8002;
# server 10.0.84.118:87;
}
upstream instock{
# server **.**.**.**:8003;
server 10.0.84.118:83;
}
upstream stock{
server **.**.**.**:8004;
}
upstream outstock{
server **.**.**.**:8005;
}
upstream zlwms {
server 10.0.84.118:83; //pc端的ip和服务端口
}
server {
listen 80;
server_name zlwms.local;
if (-d $request_filename){
rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
}
location ~ ^/(WEB-INF)/ {
deny all;
}
location /base/ {
root /opt/www/base-web/defalut;
charset utf-8;
index index.jsp index.action;
proxy_pass http://base;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
#include /opt/conf/nginx/proxy-resin.conf;
}
location /stock/ {
root /opt/www/stock-web/defalut;
charset utf-8;
index index.jsp index.action;
proxy_pass http://stock;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# include /opt/conf/nginx/proxy-resin.conf;
}
location /instock/ {
root /opt/www/instock-web/defalut;
charset utf-8;
index index.jsp index.action;
proxy_pass http://instock;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# include /opt/conf/nginx/proxy-resin.conf;
}
location /outstock/ {
root /opt/www/outstock-web/defalut;
charset utf-8;
index index.jsp index.action;
proxy_pass http://outstock;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# include /opt/conf/nginx/proxy-resin.conf;
}
location / {
root /opt/www/outstock-web/defalut;
charset utf-8;
index index.jsp index.action;
proxy_pass http://instock;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# include /opt/conf/nginx/proxy-resin.conf;
}
}
}
上一篇:C# 多态的实现
下一篇:ORTP库API使用入门