Solved

ProxyPass  and ProxyPassReverse  use

Posted on 2014-09-05
4
995 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
  • 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 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
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 custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

832 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