虚拟主机不显示正确的文件

时间:2016-02-05 09:49:18

标签: apache centos7 vhosts

Centos 7.1和apache 2.4 - 我们在服务器中安装了一个新驱动器,并希望将所有站点移动到该驱动器(挂载为/ data),站点位于/ data / vhosts

尝试访问该网站时,我们会看到apache欢迎屏幕。我可以确认vhost已加载,因为尝试更改上面的dir权限会导致禁止访问。还有一个index.php文件位于/data/vhosts/test.mydomain.com/public_html

# IP has been changed for example:
 <VirtualHost 91.91.91.91:80>
     DocumentRoot "/data/vhosts/test.mydomain.com/public_html"
     ServerName test.mydomain.com

     <Directory /data/vhosts/test.mydomain.com>
          Options All
          AllowOverride All
          order allow,deny
          allow from all
      </Directory>
   </VirtualHost>

更新1:

我删除了/etc/httpd/conf.d/中的welcome.conf文件,但我没有给出禁用的403.请注意,这是一个新的驱动器并且没有设置/ data的权限apache的(或子文件夹)。我不完全确定这是否有所作为?

我还对vhost conf文件做了一些细微的改动,但没有区别:

 NameVirtualHost *:80

 <VirtualHost *:80>
     DocumentRoot "/data/vhosts/test.mydomain.com/public_html"
     ServerName test.mydomain.com

     <Directory "/data/vhosts/test.mydomain.com">
          AllowOverride None
          # Allow open access:
          Require all granted
      </Directory>


      <Directory /data/vhosts/test.mydomain.com/public_html>
          Options Indexes FollowSymLinks Includes ExecCGI
          DirectoryIndex index.php
          AllowOverride All
          Require all granted
      </Directory>
 </VirtualHost>

0 个答案:

没有答案
相关问题