Nginx 1.20.2
支持配置Proxy Protocol吗阿里云均衡加入修改server部分配置,参考下:
server { listen 888 proxy_protocol; server_name phpmyadmin; index index.html index.htm index.php; root /www/server/phpmyadmin; #排除非用户网段,然后从proxy_protocol获取用户真实IP的配置 set_real_ip_from 192.168.10.0/24; real_ip_header proxy_protocol; #error_page 404 /404.html; include enable-php.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /\. { deny all; } access_log /www/wwwlogs/access.log; }打开网站就400报错
ng只是开启支持PP的话,在监听端口后加上proxy_protocol 即可【这是阿里的回复。】但是弄半天都不行
|
|