小编wha*_*oob的帖子

Apache 403 Forbidden 您无权访问此服务器上的 /

我是 Docker 和 Apache 的新手,正在尝试执行一个非常简单的程序,该程序将在我的本地主机上显示一个网页。然而,我一直听到403 Forbidden error这样一句话:

“您无权访问此服务器上的/”

。我正在Apache/2.4.25 (Debian)localhost Port 使用服务器5002。该目录的路径是~/tutorial/product. 我在这里阅读了许多解决方案,并尝试了所有解决方案,但没有一个对我有用。

/etc/apache2/apache2.conf

<Directory /var/www/html>
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)

/etc/apache2/sites-enabled/000-default.conf

ServerAdmin webmaster@localhost
DocumentRoot /var/www/signature

<Directory /var/www/signature/>
   Allowoverride all
   Order allow,deny
   Allow from all
   Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Run Code Online (Sandbox Code Playgroud)

我已使用以下命令将路径中每个目录的权限包含在内ls -l

〜/教程

|---------------------|------------------| …
Run Code Online (Sandbox Code Playgroud)

apache docker

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

apache ×1

docker ×1