Apache Reverse Proxy

Source: Internet
Author: User

<virtualhost *:80>
ServerName mccbbgold.chinamworld.cn
proxypass/ajp://172.17.10.13:8009/
proxypassreverse/ajp://172.17.10.13:8009/
Errorlog Logs/oto-error.log
Customlog Logs/oto-access.log Common
</VirtualHost>

The back end is tomcat.

<virtualhost *:80>
ServerName vipclub.jiumei.com
Proxyrequests off
Proxyvia on
Proxypreservehost on
Proxypass/balancer://vipclub/stickysession=phpsessionid|phpsessionid
Proxypassreverse/balancer://vipclub/stickysession=phpsessionid|phpsessionid
<proxy balancer://vipclub>
#BalancerMember http://172.17.10.15 loadfactor=100
Balancermember http://172.17.10.139 loadfactor=100
</Proxy>
Include/var/www/vhost/paybest_log.conf
Errorlog Logs/vipclub-error.log
Customlog Logs/vipclub-access_log combined
</VirtualHost>

The backend is the Web service

Namevirtualhost *:80
<virtualhost *:80>
ServerName www.we360.cn
Proxyrequests off
Proxyvia on
Proxypreservehost on

Proxypass/ykt balancer://ykt/lbmethod=bytraffic

Proxypass/balancer://test/stickysession=jsessionid Nofailover=off
proxypassreverse/balancer://test/

<proxy balancer://ykt>
Balancermember Http://172.17.10.121:/yikatong/yikatong/view
</Proxy>
<proxy balancer://test>
Balancermember ajp://172.17.10.114:8009 ROUTE=TOMCAT1
Balancermember ajp://172.17.10.115:8009 ROUTE=TOMCAT2
</Proxy>

Errorlog Logs/we360ssl_error_log
Transferlog Logs/we360ssl_access_log
</VirtualHost>

The backend is the Tomcat+web service. and enable Apache to share with Tomcat session

Nofailover=off session binding succeeds Nofailover=on each jump to a different tomcat

For the forwarding of level two directories, user access Www.we360.cn/ykt jumps to the Web server.

Test method: Create a JSP script on the Tomcat directory

[Email protected] ~]# cd/opt/tomcat/webapps/test/
[[email protected] test]# ls
test.jsp
[email protected] test]# cat test.jsp
<title>helloapp</title>
<body>
<%
System.out.println ("Call test.jsp");

%>
SessionID: <%=session.getid ()%>
</body>

[Email protected] test]#

<virtualhost *:80>
ServerName payment.paybest.cn
<location/>
SetHandler Weblogic-handler
<ifmodule mod_weblogic.c>
Weblogiccluster 172.17.10.141:7034,
Weblogicport 7034
matchexpression/abcpayment/*
</IfModule>
</Location>
Include/var/www/vhost/jsessionid_log.conf
Errorlog Logs/newabcpay_error.log
Customlog Logs/newabcpay_access.log combined
</VirtualHost>

Back end is WebLogic service

<virtualhost *:80>
ServerName ccbair.paybest.cn
<ifmodule mod_weblogic.c>
# Weblogiccluster 172.17.10.141:8004,172.168.123.140:8004,
# Weblogiccluster 172.168.123.140:8004,
Weblogiccluster 172.17.10.141:8004
Weblogicport 8004
Connecttimeoutsecs 1800
Connectretrysecs 2
Keepaliveenabled on
Keepalivesecs 25
Debug on
Debugconfiginfo on
#MatchExpression/aa/*.*
#MatchExpression/aa/*
<Location/ticket>
SetHandler Weblogic-handler
</Location>
</IfModule>
Include/var/www/vhost/jsessionid_log.conf
Errorlog Logs/ccbticket_error.log
Customlog Logs/ccbticket_access.log combined
</VirtualHost>

WebLogic Cluster environment

This article from the "Clear Sky" blog, declined reprint!

Apache Reverse Proxy

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.