본문 바로가기

프로그래밍

Apache Virtual Host

간략하게 정리. 할때마다 찾기 귀찮음.


1. 아파치 설정 Virtual 확장 설정 (httpd.conf에 추가해도 상관없으나, 관리를 위해)

httpd.conf

Include "conf/extra/httpd-vhosts.conf"



2. httpd-vhosts.conf

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin taesuz@gmail.com
    DocumentRoot "/www/htdocs/taesuz.com"
    ServerName taesuz.com
    ServerAlias www.taesuz.com

    ErrorLog "logs/taesuz.com-error.log"
    CustomLog "logs/taesuz.com-access.log" combined
</VirtualHost>

#Mac에서는 별도로 설정할 필요가 없었으나, Window 에서 해주지 않으면 접근 안됨.(xampp 기준)
<Directory "/www/htdocs/taesuz.com">
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>


3. hosts 수정

( Mac: /etc/hosts, Windows: C:\Windows\System32\drivers\etc\hosts )

....

127.0.0.1    taesuz.com

.....




'프로그래밍' 카테고리의 다른 글

Window Scheduler  (20) 2012.12.12
Window curl library.  (1) 2012.12.12
새로운 Mercurial Project 설정.  (1) 2011.12.08
IE Debugging.  (0) 2011.12.02
2011년도 적용 SW기술자 노임단가 공표  (0) 2011.11.22