我只是想学习CentOS并在上面安装了apache服务器。但是当我在本地 IP 上尝试
curl
时,我得到了 403 error
。 Intens 用户拥有 sudo 用户。
仅使用此用户安装 apache 服务器。我不知道如何授予我运行网络服务器的权限。
[Inten@localhost ~]$ hostname -I | awk '{print $1}'
10.0.2.15
[Intens@localhost ~]$ curl 10.0.2.15:80
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.<br />
</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
文件夹权限
[Intens@localhost ~]$ ls -ld /etc/httpd/
drwxr-xr-x. 5 root root 105 Oct 22 23:40 /etc/httpd/
[Intensify@localhost ~]$ ls -ld /var/www/
drwxr-xr-x. 4 root root 33 Oct 22 23:40 /var/www/
检查 /var/www/html 上是否有任何可用文件。
我现在也遇到同样的问题,请问你解决了吗?谢谢