Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ProxyPass  and ProxyPassReverse  use

Posted on 2014-09-05
4
Medium Priority
?
1,207 Views
Last Modified: 2014-09-08
hi,
I was going through this link

https://shibsp.ntu.ac.uk/confluence/display/SHIB2/Configure+Apache+mod_proxy_ajp;jsessionid=58A1EC7AA4B9E8E893FD1FE4BE350157

What is the meaning of below lines in apache

ProxyPass  /Hello ajp://localhost:8009/Hello
ProxyPassReverse  /Hello ajp://localhost:8009/Hello
0
Comment
Question by:Rocking
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:jeremycrussell
ID: 40307878
This configures the apache web server instance as a "Reverse Proxy" for the particluar context  "/Hello",

So, you could navigate to the apache webserver at the URL http://<apachewebserver>/Hello and the request would be forwarded to the Tomcat server at ajp://localhost:8009/Hello.

What you gain from this is that you "proxy" the requests through apache instead of sending them directly to the tomcat servers.  This allows you to utilize many other functions of the web servers that isn't provided by the tomcat server.
0
 

Author Comment

by:Rocking
ID: 40308251
Ok but it can be achieved by below
ProxyPass   /Hello ajp://localhost:8009/Hello

then what is the role of

ProxyPassReverse
0
 
LVL 9

Accepted Solution

by:
jeremycrussell earned 2000 total points
ID: 40308552
So, the "ProxyPass" directive does the actual mapping of the requests.   The "ProxyPassReverse" directive is there to tell apache to fix the responses from the server that's being proxied, to match that of the apache web server.   So, in this case, when the response comes back from localhost:8009, apache will fix it to show the client that the response is coming back from the apachewebserver:80.
0
 
LVL 15

Expert Comment

by:samri
ID: 40309195
rocking,

From Apache docs : http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse

More or less,  what jeremy explained.  Note however, the adjustment is only done at the response header, but the reference within the code/content is not changed.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question