通过80端口修改服务器防火墙,搭建apahce服务器出现403的解决方法,防火墙开放80端口...

使用的是wampServer2.5的组件。安装过程请参照 http://www.dodobook.net/linux/1744 安装完成之后,在服务器上可以直接的访问localhost,显示正常。但是远程通过ip或者解析的域名去访问,显示403.

首先检查防火墙,防火墙开启状态,无法访问到该服务器的网站。为了方便调试,直接把防火墙关闭,这样就可以排除端口被禁的可能.

如果开启了防火墙也可以在服务器配置的时候,开放设置入站和出站的规则。开放80端口。这样开启防火墙的时候也可以通过80来访问服务器了。此外根据需要开启3306或者其他窗口。

b456cac039589468c36a0ce625773f89.png

排除了服务器的端口的因素,直接来调整apahce的配置文件httpd.conf 关于其他部分的模块和组件请根据你的需要去开启。此处开启两个部分,即可解决远程的403。直接上代码。

# 修改成下面的代码块

# AllowOverride none

# Require all denied

Options FollowSymLinks

AllowOverride None

Order deny,allow

allow from all

Satisfy all

#改进的第二个部分

#

# Possible values for the Options directive are "None", "All",

# or any combination of:

# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

#

# Note that "MultiViews" must be named *explicitly* --- "Options All"

# doesn't give it to you.

#

# The Options directive is both complicated and important. Please see

# http://httpd.apache.org/docs/2.4/mod/core.html#options

# for more information.

#

Options Indexes FollowSymLinks

#

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

# AllowOverride FileInfo AuthConfig Limit

#

AllowOverride all

#

# Controls who can get stuff from this server.

#

# onlineoffline tag - don't remove

# Require local

Order Deny,Allow

Deny from all

Allow from all

修改完毕之后,重启apahce服务,本地测试再远程测试,能正常访问,证明已解决403,若有其他错误请尽可能的查阅相关的文档。

相关阅读:

鲜肉终究要腐烂,我在等待死亡。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值