httpd.conf 에virtual host configuration 등록

Include conf/extra/httpd-vhosts.conf

httpd-vhosts.conf 에 mod-jk 등록


NameVirtualHost 156.a.b.c:80
NameVirtualHost 156.a.b.d:80
NameVirtualHost 156.a.b.e:80
NameVirtualHost 156.a.b.f:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
Include "conf/mod-jk.conf"

<VirtualHost 156.a.b.c:80>
    ServerAdmin dummy@www.xxx.com
    DocumentRoot "/usr/local/apache2/xxx_docs/
   <Directory "/usr/local/apache2/xxx_docs">
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
   </Directory>

    ServerName www.xxx.com
    ServerAlias www.xxx.com
    ErrorLog "logs/xxx/error_log"
    CustomLog "logs/xxx/access_log" common
    JkMount   /*.action xxxworker
</VirtualHost>

<VirtualHost 156.b.c.d:80>
    ServerAdmin dummy@w.yyy.co.kr
    DocumentRoot "/usr/local/apache2/yyy_docs/
    <Directory "/usr/local/apache2/yyy_docs">
       Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
    </Directory>

    ServerName w.yyy.co.kr
    ServerAlias w.yyy.co.kr
    ErrorLog "logs/yyy/error_log"
    CustomLog "logs/yyy/access_log" common
    JkMount   /*.action yyyworker
</VirtualHost>

conf/mod-jk 의 위치는 httpd.conf 와 같은 폴더에 두면 되고, 내용은 블로그 내용을 검색하면 찾을 수 있다.

Posted by
,