Apache 403 上用户目录的别名

Apache 403 上用户目录的别名

我试图让 Apache 列出用户下载目录的内容,因此我在 /var/www/ 中创建了一个指向 /home/user/downloads 的别名

我有chmod -R 755 /home/user/download/

我的 Apache 配置如下?

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/
    <Directory />
            Options FollowSymLinks
            AllowOverride All
    </Directory>
    <Directory /var/www/>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

<Location /rutorrent>
    AuthType Digest
    AuthName "rutorrent"
    AuthDigestDomain /var/www/rutorrent/ http://<servername or IP>/rutorrent

    AuthDigestProvider file
    AuthUserFile /etc/apache2/htpasswd
    Require valid-user
    SetEnv R_ENV "/var/www/rutorrent"
</Location>

</VirtualHost>

<VirtualHost *:443>
    ServerAdmin webmaster@localhost

    SSLEngine on
    SSLCertificateFile /etc/apache2/apache.pem

    DocumentRoot /var/www/
    <Directory />
            Options FollowSymLinks
            AllowOverride All
    </Directory>
    <Directory /var/www/>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
<Location /rutorrent>
    AuthType Digest
    AuthName "rutorrent"
    AuthDigestDomain /var/www/rutorrent/ http://<servername or IP>/rutorrent

    AuthDigestProvider file
    AuthUserFile /etc/apache2/htpasswd
    Require valid-user
    SetEnv R_ENV "/var/www/rutorrent"
 </Location>
</VirtualHost>

答案1

-Indexes关闭列出目录内容的功能。您需要从配置文件中删除该功能。

相关内容