Integration of Apache and Tomcat for Port forwarding

Source: Internet
Author: User

Integration Apache and the Tomcat , reach Access the port, it is automatically forwarded to the Tomcat of the 8080 Port. When a server has more than one domain name for different applications of different sites will be used, such as the simultaneous deployment of Web sites on the server,OA , the server only recognized Port.

Here in the native test, website Port ,OA port 8080, after forwarding implementation Localhost.oa Direct access to OA, no need to add port.

1 , installation Apache , the installation path is: D:\Apache2.2 , the port defaults to the

2 , Tomcat the installation path is: D:\ Szoa\tomcat6, port defaults to 8080

3 , the mod_jk-1.2.28-httpd-2.2.3.so copied to D:\Apache2.2\modules the next.

4 , open Apache configuration file conf\httpd.conf , added at the end:

LoadModule Jk_module modules/mod_jk-1.2.28-httpd-2.2.3.so

Jkworkersfile conf/workers.properties

5 , in conf Add File Workers.propertie

WORKER.LIST=AJP13 # Module Version

worker.ajp13.port=8009 # Work Port , No modification if not occupied

Worker.ajp13.host=localhost # This machine , if the above Apache the host is not localhost, make the appropriate changes

WORKER.AJP13.TYPE=AJP13 # type

Worker.ajp13.lbfactor=1 # Number of agents , No modification

6 , modify conf/httpd.conf , using httpd-vhosts.conf

LoadModule Vhost_alias_module modules/mod_vhost_alias.so

7 , modify apache2.2/conf/extra/httpd-vhosts.conf file, add:

<virtualhost *:80>

DocumentRoot "D: \szoa\tomcat6\webapps"

DirectoryIndex index.html index.htm index.jsp

ServerName Localhost.oa

Errorlog "Logs/oa.localhost-error.log"

Customlog "Logs/oa.localhost-access.log" common

# Let Apache Support for servlet transmission, used to Tomcat parsing

jkmount/servlet/* ajp13

# Let Apache Support for JSP transmission, used to Tomcat parsing

Jkmount/*.jsp ajp13

</VirtualHost>

8 , modify conf/httpd.conf

<Directory/> within the Deny from all Comment out

9 , modify c:\windows\system32\drivers\etc\hosts

127.0.0.1 Localhost.oa

If it is on the server, the domain name resolves to the server and can

Ten , modify Tomcat the configuration tomcat\conf\ Server.xml

Host name= "Localhost.oa"

complete the above settings to achieve the goal. When set on the server, you can change the Localhost.oa to the corresponding domain name.

Integration of Apache and Tomcat for Port forwarding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.