设置 Apache 侦听 Amazon EC2 私有 DNS
我已经为 Amazone EC2 私有 DNS 创建了 Apache 虚拟主机。就像我对其他主机所做的那样。但由于某些原因,请求时总是出现403(禁止)。为了使其万无一失,我从工作主机复制了虚拟主机文件,仔细检查了所有路径和主机。它已启用并且 Apache 配置文件已重新加载。它与任何其他主机的工作方式相同。但仍然有 403 请求来自同一个或另一个 EC2 实例。
# host: ip-xyz.eu-west-1.compute.internal
# directory: /var/www/xyz
<VirtualHost *:80>
ServerName ip-xyz.eu-west-1.compute.internal
DocumentRoot /var/www/xyz
<Directory /var/www/xyz>
Options FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
有什么想法吗?
此致, 金宝
I've created a Apache virtual host for a Amazone EC2 private DNS. Just the way I did it with other hosts, too. But for some reasons, there is always a 403 (forbidden) when requesting it. To make it bulletproof I've copied the virtual host file from a working host, double checked all paths and hosts. It's enabled and Apache configuration files are reloaded. The way it works with any other host. But there is still that 403 requesting it from the same or another EC2 instance.
# host: ip-xyz.eu-west-1.compute.internal
# directory: /var/www/xyz
<VirtualHost *:80>
ServerName ip-xyz.eu-west-1.compute.internal
DocumentRoot /var/www/xyz
<Directory /var/www/xyz>
Options FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
Any ideas?
Best regards,
Jimbo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该检查错误日志(好吧,错误)和访问日志以验证您确实访问了正确的机器。
编辑:如果还有其他通配符 VirtualHost 声明,请将其从配置中删除。
You should check the error log (for, well, errors), and the access log to verify you actually accessed the right machine.
Edit: If there is another wildcard VirtualHost declaration, delete it from the configuration.