centos上的虚拟主机转到默认页面

时间:2018-10-24 14:21:21

标签: apache centos vhosts

我在Centos7上使用httpd。我在conf.d中创建了一个虚拟主机。文件夹的权限和所有权似乎都正确。该文件夹中只有一个index.html文件。 Webdocs虚拟主机一直转到Apache“ Testing 123 ..”页面。舞台虚拟主机工作正常。有任何想法吗?我需要另一只眼睛。

httpd -D DUMP_VHOSTS:

*:80 is a NameVirtualHost
default server stage.myhostname.com (/etc/httpd/conf.d/stage.myhostname.com.conf:1)
         port 80 namevhost stage.myhostname.com (/etc/httpd/conf.d/stage.myhostname.com.conf:1)
                 alias www.stage.myhostname.com
         port 80 namevhost webdocs.myhostname.com (/etc/httpd/conf.d/webdocs.myhostname.com.conf:1)
                 alias www.webdocs.myhostname.com

/var/www/vhosts/webdocs.myhostname.com:

-rwxrwxrwx. 1 apache apache 69 Oct 22 13:51 index.html
-rwxrwxrwx. 1 apache apache 69 Oct 23 12:22 index.php

我的webdocs.myhostname.com.conf虚拟主机文件:

<VirtualHost *:80>
    ServerName webdocs.myhostname.com
    ServerAlias www.webdocs.myhostname.comm
    ServerAdmin myemailaddy@gmail.com
    DocumentRoot /var/www/vhosts/webdocs.myhostname.com

    <Directory /var/www/vhosts/webdocs.myhostname.com>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>

    ErrorLog /var/log/httpd/myhostname.com-error.log
    CustomLog /var/log/httpd/myhostname.com-access.log combined
</VirtualHost>

0 个答案:

没有答案