CentOS 7.4 解决 403 Forbidden : You don't have permission to access / on this server

今天为服务器安装Wordpress时,遇到如下问题无法访问网页

403 Forbidden : You don't have permission to access /wordpress on this server


403是因为当前没有权限访问服务器指定内容

需要更改apache配置:

配置文件默认路径如下

/etc/httpd/conf/httpd.conf

[root@VM_0_17_centos conf]# vim httpd.conf
[root@VM_0_17_centos conf]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service

之后再次访问IP,成功


具体而言

将下面的一段话

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>
改为
<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>
或将最后两句改为Require All Granted (Apache2.4以上版本)


Source: StackOverFlow


  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值