标签:缓冲区 _for send buffer www ram 用户 etc 超时
192.168.3.222 nginx+php 略
192.168.3.22 mariadb 略
192.168.3.21 proxy_nginx
21host:安装nginx
[root@localhost conf.d]# cat /etc/nginx/proxy_params
proxy_set_header Host $http_host; //把域名也传到nginx
proxy_set_header X-Real-IP $remote_addr; //把客户端IP通过变量存放并传到nginx
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;//让nginx后端记录客户端真实地址
proxy_connect_timeout 30; //代理向后端链接超时时间
proxy_send_timeout 60; //代理等待后端响应时间
proxy_read_timeout 60; //后端代理回传超时时间
proxy_buffering on; //代理把数据放缓冲区,on(默认)
proxy_buffer_size 32k; //代理保存用户头信息缓冲区大小
proxy_buffers 4 128k; //缓冲区
---------------------------------------------------------------------------------------------------------
[root@localhost conf.d]# vim default.conf
server {
listen 80;
server_name www.le.com;
location / {
proxy_pass http://192.168.3.222:80;
include proxy_params;
}
}
-------------------------------------------------------------------------------------------------------
nginx -t
systemctl restart nginx
[root@localhost conf.d]# cat /etc/nginx/proxy_params proxy_set_header Host $http_host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 30;proxy_send_timeout 60;proxy_read_timeout 60;
proxy_buffering on;proxy_buffer_size 32k;proxy_buffers 4 128k;
标签:缓冲区 _for send buffer www ram 用户 etc 超时
原文地址:https://www.cnblogs.com/Leaders543/p/12499620.html