自动显示public_html文件夹


Display public_html folder automatically

我正在构建本地apache2 web服务器。这是我的VirtualHost文件的一部分。

    ServerAdmin webmaster@localhost
    ServerName www.chinchaladze.ge
    DocumentRoot /var/www/chinchaladze.ge
    <Directory />
            #Options FollowSymLinks
            #AllowOverride None
            #Options FollowSymLinks
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Order deny,allow
            Allow from all
    </Directory>
    <Directory /var/www/chinchaladze.ge>
            RewriteEngine On
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Order deny,allow
            Allow from all
    </Directory>

正如我所知,当我访问www.chinchaladze.ge时,它应该会自动找到public_html文件夹并在那里找到index.*文件。但相反,它向我显示了一个默认的"/索引"网页,类似于以下内容:https://i.stack.imgur.com/vgze8.gif

你能帮忙吗?提前感谢!

您的

Options Indexes

负责显示图像上传中的可浏览目录结构。建议从所有生产服务器中删除此设置。

使用

DirectoryIndex index.html index.htm index.php welcome.html

使Apache显示您的索引文件。

https://wiki.apache.org/httpd/DirectoryListings