[英]Apache vhost overriding config?
I have Apache installed on my VPS. 我在VPS上安装了Apache。 It is hosting one site on it, lets call it demo.com (located in /var/www/html/demo.com), but I also have files in /var/www/html that I want to view by pointing my browser to the IP of the VPS.
它在其上托管了一个站点,我们称其为demo.com(位于/var/www/html/demo.com),但我也想通过指向浏览器查看/ var / www / html中的文件。到VPS的IP。 Currently it seems if I want to go to
目前看来,如果我想去
http://vpsIP/demofile.php
it will 404, so I'm assuming it's looking in the vhost dir. 它会显示404,所以我假设它正在查看vhost目录。
Here are some settings from my httpd.conf: 这是我的httpd.conf中的一些设置:
DocumentRoot "/var/www/html"
<VirtualHost *:80>
ServerName www.demo.com
ServerAlias demo.com *.demo.com
DocumentRoot /var/www/html/demo.com
<Directory "/var/www/html/demo.com">
Order allow,deny
Allow from all
Allowoverride all
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
</IfModule>
</VirtualHost>
Do I have to specify another vhost of the VPS's IP to be able to view the files I want to? 我是否必须指定VPS IP的另一个虚拟主机才能查看我想要的文件?
Simply adding another vhost solves this problem. 只需添加另一个虚拟主机即可解决此问题。 Duh.
咄。
<VirtualHost IP:80>
DocumentRoot /var/www/html
</VirtualHost>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.