hi,各位大神好: 我配置了一个openresty做虚拟主机,将域名 a.abc.com 指向他,然后通过反向代理指向另外一台做服务的openresy上,地址为内网 http://192.168.1.100:8050/ 配置如下: location / { proxy_pass http://192.168.1.100:8050/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }在这个192.168.1.100:8050服务器上,我安装了一个WordPress服务程序,目录为 http://192.168.1.100:8050/WordPress8050的服务器配置如下 location / { root html; index index.html index.htm index.php; } location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /data/bin/openresty8050/nginx/html/$fastcgi_script_name; include fastcgi_params; }现在的问题是,如果使用 http://192.168.1.100:8050/WordPress 访问,没有问题使用 a.abc.com 访问,也可以看到 html目录下的phpinfo但是如果使用 http://a.abc.com/WordPress 访问,地址再浏览器地址栏就会变为http://a.abc.com:8050/WordPress然后访问出错急求大神帮助,折磨我一天一夜了。。。。。各种百度各种试,还是搞不定。。。。 --
hi,各位大神好: 我配置了一个openresty做虚拟主机,将域名 a.abc.com 指向他,然后通过反向代理指向另外一台做服务的openresy上,地址为内网 http://192.168.1.100:8050/ 配置如下: location / { proxy_pass http://192.168.1.100:8050/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }在这个192.168.1.100:8050服务器上,我安装了一个WordPress服务程序,目录为 http://192.168.1.100:8050/WordPress8050的服务器配置如下 location / { root html; index index.html index.htm index.php; } location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /data/bin/openresty8050/nginx/html/$fastcgi_script_name; include fastcgi_params; }现在的问题是,如果使用 http://192.168.1.100:8050/WordPress 访问,没有问题使用 a.abc.com 访问,也可以看到 html目录下的phpinfo但是如果使用 http://a.abc.com/WordPress 访问,地址再浏览器地址栏就会变为http://a.abc.com:8050/WordPress然后访问出错急求大神帮助,折磨我一天一夜了。。。。。各种百度各种试,还是搞不定。。。。