질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

가상호스트 설정 ... 좀 도와주세요...

작성자 정보

  • 허태훈 작성
  • 작성일

컨텐츠 정보

본문

네임서버에서 정상적으로 설정을 하였다면 httpd.conf의 VirtualHost 부분을 확인하시길 바랍니다.

네임서버 확인 방법

일반PC에서 시작>실행>cmd

DOS 모드에서 nslookup

>aaa.dddd.net

하여 서버 ip를 찾으면 OK

웹서버에서 httpd.conf 의 VirtualHost 확인

#NameVirtualHost *:80
NameVirtualHost 111.222.33.44:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#

<VirtualHost 111.222.33.44:80>
    ServerAdmin jongsung@pusan.ac.kr
    DocumentRoot /home/homepage/public_html
    ServerName www.dddd.com
    ErrorLog logs/www-error_log
    CustomLog logs/www-access_log common
</VirtualHost>

<VirtualHost 111.222.33.44:80>
    ServerAdmin jongsung@pusan.ac.kr
    DocumentRoot /home/aaa/public_html 

    ServerName aaa.dddd.com
    ErrorLog logs/aaa-error_log
    CustomLog logs/aaa-access_log common
</VirtualHost>

서버의 명령어모드에서 확인

# httpd -S
VirtualHost configuration:
111.222.33.44:80     is a NameVirtualHost
         default server www.dddd.com (/etc/httpd/conf/httpd.conf:1035)
         port 80 namevhost www.dddd.com (/etc/httpd/conf/httpd.conf:1035)
         port 80 namevhost aaa.dddd.com (/etc/httpd/conf/httpd.conf:1043)
Syntax OK

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,138 명
  • 현재 강좌수 :  36,201 개
  • 현재 접속자 :  288 명