阿里云页面没有访问权限的4种情况 You don't have permission to access
来源:互联网 发布:apache velocity 教程 编辑:程序博客网 时间:2024/05/16 04:40
最近基于阿里云的微信支付开发,发现总是不时的会出现 You don't have permission to access 的问题。文件测试都是先用本地做主机WampServer,可以了以后上传的所以代码没有问题,那么可以肯定问题出在服务器的配置上。
上网找了很多资料,分为3类,
1、文件夹和文件的权限问题,一般可以通过文件的颜色看出,或者使用命令 ls -l查询,一般在、var/www/html文件夹下使用 chmod 755 -R * 命令批量更改权限就可以了,-R意思就是 将文件夹和文件夹下面的文件都批量处理了。这个问题最好解决。
2、其次就是httpd的文件,在/etc/httpd/conf/httpd.conf中更改访问的权限,在某个<Directory></Directory>中间将 Deny from all 改成 Allow from all 就可以了,这个配置的猜测是个防火墙,可以设置值接受哪个Ip地址的访问
3、这个应该也是文件的配置原因导致的,当/var/www/html/文件夹下没有默认的主页的时候,如 index.php index.html 等(这些也是在/etc/httpd/conf/httpd.conf中更改的),访问dns根目录下的其他文件也会出现没有权限的问题,如直接访问kk.com/kk.html
4、最后这个我找了好几天才发现,因为一直只找到上面的几种方法,都开始怀疑服务器不稳定或者是配置有延时之类的,因为之前测试不能用的放了几天又可以了。这个文档说的是要管道selinux
vi /etc/sysconfig/selinuxSELINUX=enforcing 改为 SELINUX=disabled
执行 systemctl restart httpd
执行 setenforce 0再测试已经可以了
再次感谢这位大神的博客http://www.myexception.cn/operating-system/1627965.html
- 阿里云页面没有访问权限的4种情况 You don't have permission to access
- Apache没有目录权限的解决办法-You don't have permission to access / on this server.
- you don't have permission to access / on this server(Apache Server权限访问问题)
- you don't have permission to access / on this server(Apache Server权限访问问题)
- you don't have permission to access / on this server(Apache Server权限访问问题)
- You don't have permission to access
- apache 访问默认页面及 you don't have permission to access / on this server”问题
- yii中访问出现的错误: You don't have permission to access / on this server
- apache2.2.22 嵌入式移植403访问权限问题(You don't have permission to access / on this server)
- 访问wamp的PHPadmin时遇到Forbidden You don't have permission to access / on this server. You don't have per
- You don't have permission to access / on this server
- You don't have permission to access /*** on this server
- Wamp 报403 You don't have permission to access
- Error: You don't have permission to access that port.
- you don't have permission to access /xxx/xxx解决
- You don't have permission to access / on this server.
- You don't have permission to access on this server.
- 嵌入式 apache出现You don't have permission to access
- python数据分析之(4)读写数据文件CSV,EXCEL等
- 2017阅读目录
- 大数的阶乘
- 回溯法 素数环问题
- RRDTool
- 阿里云页面没有访问权限的4种情况 You don't have permission to access
- 13.3.1 实现 XML 辅助函数
- PAT BASIC LEVEL 1028. 人口普查(20)
- struct 的长度对齐
- 买卖装备+Sqlite
- 17 - 04 - 15 Web安全(11)
- SpringBoot文件上传下载和多文件上传(图文详解)
- 完成端口
- poj2485——Highways(最小生成树+prim)