连接被重置

连接被重置

我最近在客户的 Web 服务器上设置了一个子域名。以下是 vhost 设置:

Listen *:80

#primary domain
<VirtualHost *:80>
    # rails public folder
    DocumentRoot /u1/thisdomain.com/public
    ServerName thisdomain.com
    RailsEnv production
</VirtualHost>

#my subdomain
<VirtualHost *>
        ServerName dev.thisdomain.com
        DocumentRoot /u1/dev.thisdomain.com/public
</VirtualHost>

执行配置测试时,我没有收到任何 apache 配置错误。我正常重新启动了 apache。我在子域文档根目录中放置了一个基本的 index.html。

现在,当我尝试访问子域时,我得到:

在 Chrome 中:

The webpage is not available. Error 101 (net::ERR_CONNECTION_RESET): Unknown error.

在 Firefox 中:

The connection was reset

The connection to the server was reset while the page was loading.
 *The site could be temporarily unavailable or too busy. Try again in a few moments.
 *If you are unable to load any pages, check your computer's network connection.
 *If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

我可以访问正常此域名没有问题,其他任何网站也没有问题。我没有使用任何代理。没有特殊的网络连接设置。只是使用普通的有线调制解调器和有线 ISP。

我的子域文档根目录具有与普通域文档根目录相同的用户和组所有权(以及其子目录)。

另外,我没有看到错误或访问日志中出现任何内容。

我应该从哪里开始确定这里的问题?

答案1

在 DNS 中是否thisdomain.com解析dev.thisdomain.com为同一个 IP 地址?

此外,NameVirtualHost地址应该与两个VirtualHost地址相匹配,即:

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName thisdomain.com
  # ...
</VirtualHost>

<VirtualHost *:80>
  ServerName dev.thisdomain.com
  # ...
</VirtualHost>

相关内容