Solved

ProxyPass  and ProxyPassReverse  use

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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

A Change in PHP Behavior with Session Write Short Circuit (http://php.net/manual/en/book.session.php#116217) (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
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.
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.

628 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