在代理(ip6)nginx配置文件中配置:
server { listen 80; server_name localhost; index index.html; root /data0/htdocs/www; location ~ (\.php)$ { proxy_pass http://192.168.1.7; //被代理ip7 } }
修改完配置文件重啓nginx:
sbin/nginx -s reload
在代理(ip6)nginx配置文件中配置:
server { listen 80; server_name localhost; index index.html; root /data0/htdocs/www; location ~ (\.php)$ { proxy_pass http://192.168.1.7; //被代理ip7 } }
修改完配置文件重啓nginx:
sbin/nginx -s reload