Solved

ProxyPass  and ProxyPassReverse  use

Posted on 2014-09-05
4
1,054 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 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

733 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