网页代理服务器连接403错误怎么处理(网页代理服务器连接403错误怎么处理啊)

网页代理服务器连接403错误怎么处理(网页代理服务器连接403错误怎么处理啊)

扫码添加渲大师小管家,免费领取渲染插件、素材、模型、教程合集大礼包!

具体内容如下:

1。重建dns缓存

对于一些常规的403 forbidden错误。建议大家首先要尝试的就是重建dns缓存。在运行中输入cmd。然后输入ipconfig /flushdns即可。如果不行的话。就需要在hosts文件里把主页解析一下了。同时。查看是否在网站虚拟目录中添加默认文档。一般默认文档为:index.html;index.asp;index.php;index.jsp;default.htm;default.asp等

2。修改文件夹安全属性

用以下命令修改文件夹安全属性

chcon -R -t httpd_user_content_t public_html/

所用命令解析:

ls -Z -d public_html/

#显示文件/目录的安全语境-Z, –context

Display security context so it fits on most displays. Displays only mode, user, group, security context and file name.-d, –directory

list directory entries instead of contents, and do not dereference symbolic links

chcon -R -t httpd_user_content_t public_html/

#修改文件/目录的安全语境-R, –recursive

change files and directories recursively-t, –type

set type TYPE in the target security context

3。关于apache导致的403 forbidden错误的解决办法

打开apache的配置文件httpd.conf。找到这段代码:

Options FollowSymLinks

AllowOverride None

Order deny,allow

Deny from all

有时候由于配置了php后。这里的“Deny from all”已经拒绝了一切连接。把该行改成“allow from all”。修改后的代码如下。问题解决。

Options FollowSymLinks

AllowOverride None

Order deny,allow

Allow from all

之所以会出现错误。是因为大多数的主机在配置Apache的时候启用了mod_security。也就是开启了安全检查。如果提交的信息中包含select , % , bin等关键字。Apache就会禁止。并给出403。404。500等错误。

分享到 :
相关推荐

网站服务器硬件配置(怎么配置网站服务器)

主机测评&技术分享将通过本文讲解一步一步带你摸清楚一个网站从0到1的全过程。...

服务器放机房有什么好处(服务器放机房有什么好处吗)

随之互联网技术高新科技的迅猛发展。基本上全部的业务流程都能够网上交易量。网络服务器做...

租用香港高防BGP服务器有哪些优势(香港高防服务器价格)

租用香港高防BGP服务器的优势有:1。融合性及拓展性好。能解决国内电信和联通互不相通...

如何正确选择好的香港服务器(如何正确选择好的香港服务器地址)

正确选择香港服务器的方法:1。选择知名度高。专业可靠的机房。确保香港服务器质量;2。...

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注