做为反向代理的Nginx服务器配置如下
server {
listen 80;
server_name xiaohost.com www.xiaohost.com;
if ($uri ~ [A-Z]){ rewrite ^(.*)$ $url last; }
charset utf-8;
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;
location / {
proxy_pass http://192.168.1.2:80;
}
}