首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >别名为用户目录的Apache 403

别名为用户目录的Apache 403
EN

Server Fault用户
提问于 2014-01-20 19:29:15
回答 1查看 495关注 0票数 0

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

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

我的Apache配置如下所示?

代码语言:javascript
复制
<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>
EN

回答 1

Server Fault用户

发布于 2014-01-20 21:09:19

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

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/568599

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档