【问题标题】:AH01630: client denied by server configuration: /dataAH01630:客户端被服务器配置拒绝:/data
【发布时间】:2021-01-29 13:34:51
【问题描述】:

当我从 Apache2 的错误日志中遵循教程的 Postfix 管理部分中的 this 指南并尝试导航到网站 https://mailadmin.example.com/setup.php(也只是将我的网站名称替换为 example.com)时,我收到了这个名义上的错误消息我收到了 403 Forbidden。

AH00112: Warning: DocumentRoot [/data/www/mailadmin.example.com/html/public] does not exist
AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
AH01630: client denied by server configuration: /data

这是我在sudo nano /etc/apache2/sites-available/mailadmin.example.com-le-ssl.conf 的虚拟主机配置 :

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName mailadmin.example.com
        ServerAlias mailadmin.example.com
        ServerAdmin admin@example.com

        DocumentRoot /data/www/mailadmin.example.com/html/public
        <Directory /data/www/mailadmin.example.com/html/public>
                Options -Indexes +FollowSymLinks
                DirectoryIndex index.php
                AllowOverride All
                Require all granted
        </Directory>

        RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

#       RewriteCond %{SERVER_NAME} =mailadmin.example.com
#       RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
</VirtualHost>
</IfModule>

我不知道这个/data 是什么意思,也找不到这样的文件夹。我不明白为什么我会收到 403 Forbidden。

【问题讨论】:

    标签: apache virtualhost http-status-code-403 postfix-mta


    【解决方案1】:

    错误准确地说明了问题所在:

    /data/www/mailadmin.example.com/html/public does not exist
    

    创建它! 另外,参考官方文档:https://github.com/postfixadmin/postfixadmin。 该指南可能写得不好且前后不一致。

    【讨论】: