Httpd-vhosts.conf
# Virtual Hosts
#
# Required Modules:mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine your can setup VirtualHost containers for them. Most configurations
# Use of name-based virtual hosts so the server doesn ' t need to worry about
# IP addresses. This was indicated by the asterisks in the directives below.
#
# documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before your try to setup virtual hosts.
#
# The command line option '-s ' to verify your virtual host
# configuration.
Namevirtualhost *:80
#
# VirtualHost Example:
# Almost any Apache directive could go into a VirtualHost container.
# The first VirtualHost section was used for all requests and that does not
# match a ServerName or Serveralias in any <VirtualHost> block.
#
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/xxx"
ServerName Domain Name
Serveralias Domain Name
Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "" combined
Customlog "|/usr/local/sbin/cronolog/usr/local/apache-2.2.27/logs/access_log.%y%m%d" combined
<directory/>
Options FollowSymLinks includes
AddType text/html. shtml. html htm
Addoutputfilter includes. shtml. html. htm
DirectoryIndex index.shtml index.html
AllowOverride None
</Directory>
<Directory/var/www/html/xxx>
Options FollowSymLinks includes
AllowOverride None
Order Allow,deny
Allow from all
AddType text/html. shtml. htm
Addoutputfilter includes. shtml. htm
</Directory>
scriptalias/cgi-bin//usr/lib/cgi-bin/
<directory "/usr/lib/cgi-bin" >
AllowOverride None
Options +execcgi-multiviews +symlinksifownermatch
Order Allow,deny
Allow from all
</Directory>
#ErrorLog ${apache_log_dir}/error.log
# Possible values Include:debug, info, notice, warn, error, crit,
# Alert, Emerg.
LogLevel warn
#CustomLog ${apache_log_dir}/access.log combined
Jkmount/*.do dlog4j
Jkmount/*.action dlog4j
Jkmount/*.htm dlog4j
Jkmount/*.jsp dlog4j
</VirtualHost>
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/xxx"
ServerName Domain Name
Serveralias Domain Name
Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "" combined
Customlog "|/usr/local/sbin/cronolog/usr/local/apache-2.2.27/logs/access_log.%y%m%d" combined
<directory/>
Options FollowSymLinks includes
AddType text/html. shtml. html htm
Addoutputfilter includes. shtml. html. htm
DirectoryIndex index.shtml index.html
AllowOverride None
</Directory>
<Directory/var/www/html/htqh_web>
Options FollowSymLinks includes
AllowOverride None
Order Allow,deny
Allow from all
AddType text/html. shtml. htm
Addoutputfilter includes. shtml. htm
</Directory>
scriptalias/cgi-bin//usr/lib/cgi-bin/
<directory "/usr/lib/cgi-bin" >
AllowOverride None
Options +execcgi-multiviews +symlinksifownermatch
Order Allow,deny
Allow from all
</Directory>
#ErrorLog ${apache_log_dir}/error.log
# Possible values Include:debug, info, notice, warn, error, crit,
# Alert, Emerg.
LogLevel warn
#CustomLog ${apache_log_dir}/access.log combined
Jkmount/*.do dlog4j
Jkmount/*.action dlog4j
Jkmount/*.htm dlog4j
Jkmount/*.jsp dlog4j
</VirtualHost>
httpd.conf
introduction of mod_jk.so;
Additional
Jkworkersfile conf/workers.properties
Jkmountfile conf/uriworkermap.properties
Jklogfile Logs/mod_jk.log
Jkloglevel warn
Jkmount/*.do dlog4j
Jkmount/*.action dlog4j
Jkmount/*.htm dlog4j
Jkmount/*.jsp dlog4j
Workers.properties
#
# workers.properties
#
# list the workers by name
worker.list=dlog4j, status
# localhost server 1
# ------------------------
worker.s2.port=8009
worker.s2.host=127.0.0.1
Worker.s2.type=ajp13
Worker.s2.stopped=0
Worker. Dlog4j.type=lb
Worker.retries=3
Worker. Dlog4j.balanced_workers=s1
Worker. Dlog4j.sticky_session=1
Worker.status.type=status
Uriworkermap.properties
/*=dlog4j
/jkstatus=status
!/*.xml=dlog4j
!/*.flv=dlog4j
!/*.ico=dlog4j
!/*.gif=dlog4j
!/*.jpg=dlog4j
!/*.jpeg=dlog4j
!/*.png=dlog4j
!/*.css=dlog4j
!/*.js=dlog4j
!/*.swf=dlog4j
!/*.htm=dlog4j
!/*.html=dlog4j
!/*.shtml=dlog4j
!/*.zip=dlog4j
!/*.pdf=dlog4j
!/*.txt=dlog4j
!/*.doc=dlog4j
!/*.docx=dlog4j
!/*.xls=dlog4j
!/*.xlsx=dlog4j
!/*.ppt=dlog4j
!/*.pptx=dlog4j
!/*.rar=dlog4j
!/*.arj=dlog4j
!/*.exe=dlog4j
Configure domain Names