nginx 过滤 ip 访问

                location ^~ /XXXX/XXXXX/ {
                        allow XXX.XX.XXX.0/24;
                        allow XXX.XXX.XXX.0/16;
                        deny all;

                                proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
                                proxy_connect_timeout       15s;
                                proxy_read_timeout          15s;
                                proxy_pass http://tw.rennpay.com;
                                proxy_set_header X-Real-IP $remote_addr;
                                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                }

猜你喜欢

转载自hyl198611.iteye.com/blog/2119278