[웹서버]아파치 모듈 mod_proxy를 이용한 도메인 포워딩 방법
도메인 포워딩은 다음과 같은 식으로 처리됩니다.
  [ http://도메인  –> http://다른도메인 ]
  [ http://도메인/가상경로  –> http://다른도메인 ]  
예) http://voution.tt.co.kr/tt  –>  http://staffs.tt.co.kr/~ysshim
     http://volution.tt.co.kr/pynux  –>  http://pynux.com:8080 
* 주소창에는 기존의 주소가 그대로 표시됨
   ‘가상경로’는 존재하지 않는 디렉토리로서 다른 이름으로 무한정 포워
딩 가능 
이 서비스를 위해서는 아파치 모듈인 mod_proxy 를 설치해야 합니다.
1. mod_proxy 설치방법
/usr/local/src/apache_XXXX/src/Configuration 파일 중 다음의 주석을 제
거합니다. 
    ## Optional Proxy
    ##
    ## The proxy module enables the server to act as a proxy for
outside
    ## http and ftp services. It’s not as complete as it could be
yet.
    ## NOTE: You do not want this module UNLESS you are running a
proxy;
    ##       it is not needed for normal (origin server) operation. 
    AddModule modules/proxy/libproxy.a
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
그 다음 다음과 같이 재 컴파일 합니다.
cd /usr/local/src/apache_XXXX
./configure –prefix=/www –activate-
module=src/modules/php4/libphp4.a \\
                  –activate-module=src/modules/proxy/libproxy.a 
make; make install
2. httpd.conf 설정에서 추가
다음과 같이 httpd.conf 에서 ProxyPass와 ProxyPassReverse 항목을 추가
합니다. 
<VirtualHost volution.tt.co.kr>
    DocumentRoot /www/htdocs/imsi
    ServerName volution.tt.co.kr 
    ProxyPass / http://staffs.tt.co.kr/~ysshim/
    ProxyPassReverse / http://staffs.tt.co.kr/~ysshim/ 
    ProxyPass /pynux http://pynux.com:8080
    ProxyPassReverse /pynux http://pynux.com:8080 
</VirtualHost>
* [도메인 –> 도메인] 의 경우 실제 주소의 맨끝에 반드시 / 를 붙여야
하고,
   [도메인/가상경로 –> 도메인(/실제경로)] 의 경우 맨끝에 / 를 생략한
다. 
** 참고 사이트
http://httpd.apache.org/docs/mod/mod_proxy.html
http://www.zope.org/Members/anser/apache_zserver


 
																			 
																											 
																											 
																											