books
Free Books / Computers / Practical mod_perl /

previous page: 12.7.1.1. ProxyPass
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 12.7.1.3. Security issues

12.7.1.2. ProxyPassReverse




Description

This section is from the "Practical mod_perl" book, by Stas Bekman and Eric Cholet. Also available from Amazon: Practical mod_perl

This directive lets Apache adjust the URL in the Location header on HTTP redirect responses. This is essential when Apache is used as a reverse proxy to avoid bypassing the reverse proxy because of HTTP redirects on the backend servers. It is generally used in conjunction with the ProxyPass directive to build a complete frontend proxy server.

ProxyPass          /perl/  http://backend.example.com/perl/
ProxyPassReverse   /perl/  http://backend.example.com/perl/

When a user initiates a request to http://www.example.com/perl/foo, the request is proxied to http://backend.example.com/perl/foo. Let's say the backend server responds by issuing a redirect for http://backend.example.com/perl/foo/ (adding a trailing slash). The response will include a Location header:

Location: http://backend.example.com/perl/foo/

ProxyPassReverse on the frontend server will rewrite this header to:

Location: http://www.example.com/perl/foo/

This happens completely transparently. The end user is never aware of the URL rewrites happening behind the scenes.

Note that this ProxyPassReverse directive can also be used in conjunction with the proxy pass-through feature of mod_rewrite, described later in this chapter.

 

Continue to:

  • prev: 12.7.1.1. ProxyPass
  • Table of Contents
  • next: 12.7.1.3. Security issues

Books by Stas Bekman:















TOP
previous page: 12.7.1.1. ProxyPass
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 12.7.1.3. Security issues

Topics

  • Animals
  • Architecture
  • Arts
  • Business
  • Computers
  • Crafts
  • Fairy Tales
  • Finance
  • Flora and Plants
  • Cooking
  • Gardening
  • Health and Healing
  • History
  • Home Improvements
  • Languages
  • New Age
  • Novels
  • Real Estate
  • Reference
  • Religion
  • Science
  • Society
  • Sports
  • Travel
  • Outdoors


Search

My Books

Headaches Begone! A Systemic Approach To Healing Your Headaches
Don't Let Your Bike Seat Ruin Your Sex Life Book

Discover

  • Answers FAQ

[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007-2021 StasoSphere.com