Apache 和虚拟主机的问题
我正在尝试在 Apache 服务器上运行 MediaWiki 和 Wordpress。我已经在 MediaWiki 站点上设置了几个子域虚拟主机,所以那里一切都很好。它安装在/var/www/html/mediawiki
。
我正在尝试将 WordPress 安装在它自己的目录 /var/www/wordpress
上。 在我的 WordPress 虚拟主机的配置文件中,我有:
<VirtualHost *:80>
ServerName domain.com
ServerAdmin [email protected]
DocumentRoot /var/www/wordpress
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/wordpress/> AllowOverride All</Directory>
显然,domain.com 不是域。
然而,每当我访问domain.com时,它似乎都会从/var/www/html/mediawiki
加载MediaWiki安装,这显然不是我想要的。
有人知道我在这里做错了什么吗?
I'm, trying to run both MediaWiki and Wordpress on an Apache server. I've got the MediaWiki site set up with a couple of sub-domain Virtual Hosts, so everything is fine there. This is installed at /var/www/html/mediawiki
.
I'm trying to install Wordpress on it's own directory, /var/www/wordpress
.
In my config file for Wordpress' virtual host, I've got:
<VirtualHost *:80>
ServerName domain.com
ServerAdmin [email protected]
DocumentRoot /var/www/wordpress
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/wordpress/> AllowOverride All</Directory>
Obviously domain.com is not the domain.
Whenever I visit domain.com, however, it seems to be loading the MediaWiki install from /var/www/html/mediawiki
, which is obviously not what I want.
Anyone got any ideas what I'm doing wrong here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
运行 apachectl 以查看服务器上运行的所有服务器/虚拟主机端口 80 和 443
另外我相信:
应该位于您的虚拟主机块内
Run apachectl to see all the servers/vhosts running on your server both port 80 and 443
Also I believe that:
should be inside of your virtual host block