【发布时间】:2016-10-20 06:01:30
【问题描述】:
环境:
服务器:AWS EC2-WINDOWS 2012 R2
网络服务器:Apache 2.4.17
简单的网络应用程序,可以从服务器访问,使用带有http://localhost/和http://127.0.0.1/的浏览器
但是,当我尝试通过在浏览器中放置我的 ec2 实例公共 DNS ('ec2-.compute.amazonaws.com') 从外部(例如,客户端或任何其他通过 Internet 的机器)访问它时,我得到下列
现在我知道这是网络服务器问题。 EC2 安全规则和 Windows Server 防火墙已被绕过。问题来自我的 Apache 服务器设置。
我在这里花了很多时间尝试所有可能的解决方案:
WAMP error: Forbidden You don't have permission to access /phpmyadmin/ on this server
Forbidden: You don't have permission to access / on this server, WAMP Error
Error message “Forbidden You don't have permission to access / on this server”
You don't have permission to access / on this server
虽然我没有创建虚拟主机。我需要吗?
我当前的httpd.conf有以下设置:
<Directory "C:/wamp64/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
可能是什么问题?
【问题讨论】:
-
您是否检查了安全组配置。您是否为输入和输出端口启用了端口 80 和 8080?
-
@JeetendraChoudhary 是的,我认为如果安全组有问题,我应该得到网络服务器的任何响应。安全规则先于访问网络服务器。
-
我想问题与目录列表有关。您可以尝试在 / 中创建一个子目录并在其中放置一个 index.html 文件并检查您是否可以访问它?
-
@JeetendraChoudhary 我试过了。我在
www下创建了root,并添加了index.html。我尝试使用 url ` ....amazonaws.com/root/index.html` 我得到了相同的结果You don't have permission to access /root/index.html on this server.
标签: apache amazon-web-services amazon-ec2 httpd.conf windows-server-2012-r2