nginx端口转发配置
server { listen 8082; server_name localhost; location / { proxy_pass http://192.168.0.20:8082; 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 50M; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 7878; server_name localhost2; location / { proxy_pass http://192.168.0.20:7878; 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 50M; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }