URL 显示目录列表而不是网站

URL shows directory listing instead of website

我 VPS 在 centos 中托管了多个域。下面给出的是我的 httpd.conf

        NameVirtualHost *:80
        NameVirtualHost *:443

        <Directory "/var/www/html">
         Options +FollowSymLinks
         AllowOverride All
         Order allow,deny
         Allow from all
        </Directory>


        <VirtualHost *:80>
            ServerAdmin vijay@abc.in
            DocumentRoot /var/www/html/abc.in
            ServerName abc.in
            ServerAlias abc.in
            ErrorLog logs/abc-error_log
            CustomLog logs/abc-access_log common
        </VirtualHost>

        <VirtualHost *:443>
            ServerAdmin vijay@abc.in
            DirectoryIndex index.php
            DocumentRoot "/var/www/html/abc.in"
            ServerName www.abc.in
            ServerAlias abc.in
         ErrorLog logs/abc.in-error_log
            CustomLog logs/abc.in-access_log common
            ServerAlias abc.in
          <Directory "/var/www/html/abc.in">
            Options Indexes FollowSymLinks
            AllowOverride all
            Order allow,deny
            Allow from all
        </Directory>
        </VirtualHost>

        <VirtualHost *:80>
            ServerAdmin vijay@abc.in
            DocumentRoot /var/www/html/blog
            ServerName blog.abc.in
            ErrorLog logs/blog-error_log
            CustomLog logs/blog-access_log common

        <Directory "/var/www/html/blog">
            Options Indexes FollowSymLinks MultiViews Includes
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>

        </VirtualHost>
        <VirtualHost *:80>
            ServerAdmin vijay@abc.in
            DocumentRoot /var/www/html/domain1
            ServerName domain1.abc.in
            ErrorLog logs/ped-error_log
            CustomLog logs/ped-access_log common

        <Directory "/var/www/html/domain1">
            Options Indexes FollowSymLinks MultiViews Includes
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>

        </VirtualHost>

         <VirtualHost *:80>
            ServerAdmin vijay@abc.in
            DocumentRoot /var/www/html/domain2
            ServerName domain2.com
            ServerAlias www.domain2.com
            ErrorLog logs/domain2-error_log
            CustomLog logs/domain2-access_log common
        <Directory "/var/www/html/domain2">
            Options Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>

        </VirtualHost>


        <VirtualHost *:80>
            ServerAdmin vijay@abc.in
            DocumentRoot /var/www/html/domain3
            ServerName domain3.co
            ServerAlias www.domain3.co
            ErrorLog logs/domain3-error_log
            CustomLog logs/domain3-access_log common

        <Directory "/var/www/html/domain3">
            Options Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>

        </VirtualHost>

Welcome.conf

        <LocationMatch "^/+$">
        Options Indexes +FollowSymLinks
        ErrorDocument 403 /error/noindex.html
        </LocationMatch>

问题:

abc.in 当我们去 https://abc.in 时工作正常显示目录列表而不是当我们访问 abc.in.

时显示相同的内容

非常感谢您的帮助

我找到了自己问题的答案!!

我已经从

        <VirtualHost IP:443>
        ServerAdmin vijay@abc.in
        DirectoryIndex index.php
        DocumentRoot "/var/www/html/abc.in"
        ServerName www.abc.in
        ServerAlias abc.in
        ErrorLog logs/abc.in-error_log
        CustomLog logs/abc.in-access_log common
        ServerAlias abc.in
        <Directory "/var/www/html/abc.in">
        Options Indexes FollowSymLinks
        AllowOverride all
        Order allow,deny
        Allow from all
        </Directory>
        </VirtualHost>

<VirtualHost *:443>
        ServerAdmin vijay@smartrx.in
        #DirectoryIndex index.php
        DocumentRoot "/var/www/html/smartrx.in"
        ServerName www.abc.in
        SSLEngine on
        SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
        SSLCertificateFile /path/certificate.crt
        SSLCertificateKeyFile /path/certificate.key
        SSLCertificateChainFile /path/keychain.crt
        ServerAlias abc.in
        ErrorLog logs/abc.in-error_log
        CustomLog logs/abc.in-access_log common

        <Directory "/var/www/html/abc.in">
        Options Includes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
        </Directory>
        </VirtualHost>

主要更改:删除了 IP 并包含了 SSL 相关项目,并且在选项中删除了索引评论了 welcome.conf

中的所有项目