Nginx跳转配置
1.携带目录调转到后端,后端无目录,location配置如下 例子: i2.jusdacfj.com/ideas_edi/——10.0.2.137:7040/10.0.2.138:7040 location ^~/ideas_edi/ { ##携带"/" proxy_pass http://edi1/; ##携带"/" proxy_redirect off; proxy_set_header Host $remote_addr; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_max_temp_file_size 0; proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 300; proxy_buffer_size 4k; proxy_buffers 4