#user nobody;
worker_processes 4;
#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;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 3;
gzip_proxied any;
gzip_types *;
#################################################################################################################
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#proxy_pass https://10.63.244.154:8080/;
#proxy_redirect https://10.63.244.154:8080/ /;
#root D:/code/vue;
root D:/code/web/webapp;
#root D:/codetemp/web/webapp;
autoindex on;
index index.html;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 600s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
#location /api/mapping/ {
location /api {
proxy_pass https://10.89.168.135/api;
#proxy_redirect https://10.67.18.17/api /api;
#mapping
#proxy_pass http://10.40.146.191:9021/;
proxy_connect_timeout 600s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
location /api/wxcop/ {
#proxy_pass https://10.89.168.135/api/wxcop/;
proxy_pass http://10.40.146.191:9003/;
#proxy_connect_timeout 600s;
#proxy_read_timeout 600s;
#proxy_send_timeout 600s;
}
#location /api {
#proxy_pass https://10.67.18.17/api;
#proxy_redirect https://10.67.18.17/api /api;
#proxy_pass http://10.60.139.19:9003/api;
#proxy_redirect http://10.60.139.19:9003/api /api;
#proxy_connect_timeout 600s;
#proxy_read_timeout 600s;
#proxy_send_timeout 600s;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
nginx
最新推荐文章于 2023-10-10 18:42:23 发布