카테고리 없음

VirtualHost 설정하기 아파치 가상호스팅.

비개인오후 2010. 3. 3. 18:43
#
# Use name-based virtual hosting.
#

#NameVirtualHost *:80 - 앞의 주석을 제거해줘야 한다.
NameVirtualHost *:80

#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# 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 *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>


# 추가되는 사이트들을 엮는다
<VirtualHost *:80>
        ServerAdmin webmaster@가상호스팅사이트.com - 관리자 메일주소
        DocumentRoot /home/아이디/web/ - 호스팅대상의 문서 Root경로
        ServerName 가상호스팅사이트.com - 도메인 명을 써준다. 서브도메인이라면 앞에 붙여준다.
        ErrorLog /dev/null - 에러로그파일 경로 : 여기서는 안맹근다.
        CustomLog /dev/null common - 일반로그파일 경로 : 역시 안맹근다.
</VirtualHost>