redhat centos apache 403 错误
centos7 apache2.2.34源码包安装成功,确认进程已启动( ps -le | grep httpd) ,防火墙已关闭,但访问时报错:
Forbidden You don't have permission to access / on this server
原因为:安装目录/conf/httpd.conf配置文件中
User deamon
Group deamon
选项没有修改,上述配置为默认配置,将其修改为
User test(安装http的用户名)
Group test (安装http的用户组名)
访问正常。
注:centos7 防火墙开启、关闭设置
systemctl stop firewalld.service #停止firewall,start 开启
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
来源:oschina
链接:https://my.oschina.net/u/4282343/blog/4341482