server
{
listen 80;
server_name dianxi.test.net;
#将地址重定向为新的ip地址
#rewrite "^/env=(.*)$" http://www.test.net/$1 break;
location / {
#proxy_set_header Host $host;
#proxy_set_header X-Real-Ip $remote_addr;
#proxy_set_header X-Forwarded-For $remote_addr;
#反向代理,使用变量在nginx的配置文件中的http{}部分添加一行resolver 8.8.8.8;即可
proxy_pass http://www.test.net/index.shtml?/app=13$remote_addr;
}
error_page 404 /include/error.shtml;
error_log D:/server/var/logs/nginxerror.log ;
access_log D:/-erver/var/logs/nginxaccess.log ;
}
转载于:https://www.cnblogs.com/GNblog/p/7699589.html