Solved

ProxyPass  and ProxyPassReverse  use

Posted on 2014-09-05
4
930 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now