Apache VHosts 구성 ERR_CONNECTION_TIMED_OUT

Apache VHosts 구성 ERR_CONNECTION_TIMED_OUT

문제

내 Apache/2.2.15는 하위 도메인을 통해 액세스하려는 웹 사이트를 제공하지 않습니다. 예를 들어 URL을 입력하면 오류가 발생 domain.tld합니다 .subdomain.domain.tldERR_CONNECTION_TIMED_OUT

내 파일 구조

거기 에 /var/www/html폴더가 있습니다

  • domain-production- 테스트와 함께 index.html을 포함합니다.<h1></h1>
  • domain-staging- 다른 테스트와 함께 index.html을 포함합니다.<h1></h1>
  • phpMyAdmin- 해당 도구의 표준 설치가 포함되어 있습니다.

제가 한

포트 80에서 수신 대기 중인 httpd를 확인하세요.

tcp   0   0   :::80   :::*   LISTEN   2227/httpd

/etc/httpd/conf/httpd.conf 다음으로 설정된 문서 루트 에서

DocumentRoot "/var/www/html"

나중에 디렉토리를 다음으로 설정하십시오.

<Directory "/var/www/html">

마지막으로 하위 도메인 stagingphpmyadmin.

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName domain.tld
    DocumentRoot /var/www/html/domain-production
</VirtualHost>

<VirtualHost *:80>
    ServerName staging.domain.tld
    DocumentRoot /var/www/html/domain-staging
</VirtualHost>

<VirtualHost *:80>
    ServerName phpmyadmin.domain.tld
    DocumentRoot /var/www/html/phpMyAdmin
</VirtualHost>

내가 무엇을 놓치고 있나요? 감사해요

답변1

해결책: 문제는 iptables를 다시 시작해야 한다는 것이었습니다. 저는 대부분의 방화벽 규칙을 작성한 iRedMail을 실행하고 있다고 말씀드리고 싶습니다. 그래서 포트 80이 실수로 차단되었습니다. 왜냐하면 iptables에는 ACCEPT.

관련 정보