📚半代理配置
半代理只代理后台 前端靠nginx 节省webos程序开销 极大提升性能
提示:半代理需要配合宝塔或者其他网站管理工具实现
location ^~ /webos/
{
proxy_pass http://localhost:8088/webos/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection Upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 3600s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_max_body_size 100m;
}
📚全代理配置
全代理后台和前端都走nginx和webos程序 性能偏差
location ^~ /
{
proxy_pass http://localhost:8088/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection Upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 3600s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_max_body_size 100m;
}
至此结束 【nginx代理完成】