2015-09-16 34 views
0

我已经设置了一个带有apache的反向代理,并且指向我的本地网络上的另外4个apache wordpress服务器vm。网站使用apache反向代理解析为本地地址

当我去其中3个网站(例如www.mywebsite.com从我的电脑在工作),他们解决得很好,网站正确地产生页面。

当我尝试连接到第4个站点时,它将我重定向到192这是我在代理配置中的地址,但它不像其他站点那样正确解析。我直接复制并粘贴000-default.conf中的每个块,所以我知道它们是相同的。

该代理工作正在移动流量,但会尝试在本地解决。这是来自我的000-default.conf的块。

<VirtualHost *:80> 
# The ServerName directive sets the request scheme, hostname and port that 
# the server uses to identify itself. This is used when creating 
# redirection URLs. In the context of virtual hosts, the ServerName 
# specifies what hostname must appear in the request's Host: header to 
# match this virtual host. For the default virtual host (this file) this 
# value is not decisive as it is used as a last resort host regardless. 
# However, you must set it for any further virtual host explicitly. 

ServerName www.mywebsite.com 

ServerAdmin [email protected] 
DocumentRoot /var/www/html 

ProxyPass/http://192.168.1.23:80/ 
ProxyPassReverse/http://192.168.1.23:80/ 

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 
# error, crit, alert, emerg. 
# It is also possible to configure the loglevel for particular 
# modules, e.g. 
#LogLevel info ssl:warn 

ErrorLog ${APACHE_LOG_DIR}/error.log 
CustomLog ${APACHE_LOG_DIR}/access.log combined 

# For most configuration files from conf-available/, which are 
# enabled or disabled at a global level, it is possible to 
# include a line for only one particular virtual host. For example the 
# following line enables the CGI configuration for this host only 
# after it has been globally disabled with "a2disconf". 
#Include conf-available/serve-cgi-bin.conf 
</VirtualHost> 

我不知道这些网站之间有什么不同。我已经完成了很多次,从来没有遇到过这个问题。这可能是第4个网站上的Web服务器的问题吗?这些都是虚拟机运行的带灯的Ubuntu服务器。

回答

0

看起来这是第4台服务器的问题,以及它如何使用wordpress处理索引文件。似乎WordPress必须先在本地进行配置。但是,我不记得与其他网站一起做这件事。一切都很好。