【发布时间】:2017-02-28 14:22:48
【问题描述】:
我在 GoDaddy (example.com) 上注册了一个域,并且托管在虚拟专用服务器上。 www.example.com 的 Apache 配置运行良好。 我创建了一个子域 (staging.example.com) 并在 Apache 配置中进行了必要的虚拟主机设置,但它没有解析。
我为“暂存”创建了一条 A 记录,并在我的域的 GoDaddy 区域文件中指向了我的服务器的 IP 地址。
我的 VirtualHost 设置如下。 (这在单独的 virtualhosts.conf 文件中定义,并包含在主 httpd.conf 中)
<VirtualHost "MyserverIPAddress":8080>
ServerName staging.example.com
ServerAlias staging.example.com
ProxyRequests Off
<Location />
ProxyPreserveHost On
ProxyPass http://example.com:8080/
ProxyPassReverse http://example.com:8080/
</Location>
</VirtualHost>
我做错了什么?
谢谢! 沙拉德
【问题讨论】:
-
“但它没有解决”——具体是什么意思?当您的客户端查询 DNS 服务器时,它是否无法正确解析?或者请求是否到达您的 Apache,但不知道如何处理它?错误?
-
当我在浏览器中输入 url staging.example.com:8080 时,它一直在旋转,一段时间后出现 503 错误。该请求似乎没有达到 apache 配置的解决方案。我有