Wednesday, December 17, 2014

Windows Apache2.2+Tomcat6+Virtual hosting Configuration

This will give detailed idea about Apache2.2+Tomcat 6 configuration with Virtual hosting.   1.Install Apache Server and check the corre... thumbnail 1 summary
This will give detailed idea about Apache2.2+Tomcat 6 configuration with Virtual hosting.
 1.Install Apache Server and check the correctness by accessing
                http://localhost
                default page will load.
2.Install Tomcat container and check the correctness by accessing
                http://localhost:8080/
                default page will load.
3.Download the Apache tomcat Apache JServ Protocol  connector from http://tomcat.apache.org/download-connectors.cgi
4.Copy the downloaded file mod_jk-apache-2.2.3.so to modules/
5.Create a file mod_jk.config in \conf folder with the following contents.
                LoadModule jk_module modules/mod_jk-apache-2.2.3.so
                JkWorkersFile conf/workers.properties
                JkShmFile logs/mod_jk.shm
                JkLogFile logs/mod_jk.log
                JkLogLevel info
                JkMount /chat/* worker1
6.Create workers.properties in /config with the following contents
                worker.list=worker1
                worker.worker1.type=ajp13
                worker.worker1.host=localhost
                worker.worker1.port=8009
7.Edit the httpd.config file and add the following,
         This is for virtual host configuration
                NameVirtualHost *:80
                NameVirtualHost *:443
                <VirtualHost *:80>
                                DocumentRoot C:/BALA/Apache/htdocs/e-Shop
                                ServerName bala.test2.corp.com
                                # Other directives here
                </VirtualHost>
                <VirtualHost *:80>
                                    #DocumentRoot C:/BALA/Apache/htdocs/individual
                                JkMount / worker1
                                JkMount /* worker1
                                ServerName bala.test1.corp.com
                                # Other directives here
                </VirtualHost>

  add the below file at the bottom of the file to load the configuration.
  Include conf/mod_jk.conf
 8. Restart the server
10. Page will be loaded without tomcat port.


No comments

Post a Comment