今天准备centos7上搭建http服务器,遇到一个问题,花了两三个小时的时间才解决掉。
使用yum安装了http服务后,编辑/etc/httpd/conf/httpd.conf ,启动http服务,打开浏览器,提示出错误信息:
Forbidden
You don't have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
遇到这个问题让我很郁闷,网上百度的解决方式都是编辑配置文件,修改httpd.conf成 Allow from all
- <Directory />
- Options Indexes FollowSymLinks
- AllowOverride None
- Allow from all
- </Directory></span>
<Directory />部分Require all denied
<Directory /> AllowOverride none Require all denied </Directory> |
<Directory /> AllowOverride none Require all granted </Directory> |