连接被重置

Jak*_*son 4 configuration httpd web-server centos apache-2.2

我最近在我的客户端 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>
Run Code Online (Sandbox Code Playgroud)

进行配置测试时,我没有收到任何 apache 配置错误。我优雅地重新启动 apache。我在子域文档根中抛出了一个基本的 index.html。

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

在 Chrome 中:

The webpage is not available. Error 101 (net::ERR_CONNECTION_RESET): Unknown error.
Run Code Online (Sandbox Code Playgroud)

在 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.
Run Code Online (Sandbox Code Playgroud)

我可以毫无问题地访问正常的thisdomain.com,也可以毫无问题地访问任何其他网站。我不支持任何类型的代理。没有特殊的网络连接设置。只是一个带有我的有线 ISP 的普通电缆调制解调器。

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

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

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

Sim*_*onJ 5

在 DNS 中做thisdomain.comdev.thisdomain.com解析到相同的 IP 地址吗?

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

NameVirtualHost *:80

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

<VirtualHost *:80>
  ServerName dev.thisdomain.com
  # ...
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)