NGINX agent Tomcat configuration file

//反向代理tomcat
location ^~ /tomcat/ {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100m;
client_body_buffer_size 256k;
proxy_connect_timeout 60;
proxy_send_timeout 30;
proxy_read_timeout 30;
proxy_buffer_size 8k;
proxy_buffers 8 64k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}

The above configuration configured to NGINX.conf, restart or reload configuration files like, so that you can access the service through Tomcat sever_name / tomcat

Guess you like

Origin www.cnblogs.com/chenzhengwei/p/11238140.html