Go to the Stanford University web site
or
Log In
(To add something to the Commons.)

reverse_proxy 5.1.0

in
Download Size md5 hash
reverse_proxy-5.x-1.0.tar.gz 1.16 KB c30e59d63ed8c8dc4e89098f842a3e5a
Last updated: Fri, 10/22/2010 - 12:16

Previously, configuring Drupal to work in the Leland web environment with a Virtual Host Proxy (aka, "Vanity URL") required making changes to includes/bootstrap.inc. However, this presented several problems:

  1. You should not modify Drupal core
  2. It complicates upgrading
  3. You should not modify Drupal core

The Stanford Open Source Lab is pleased to present the Reverse Proxy module for Drupal 5. Please read the README.txt, included with the module and highlighted below, before installing.

Two things to be aware of:
  1. Only enable the Reverse Proxy module if the site is using a Virtual Host Proxy. If the module is enabled on a site that is not using a Virtual Host Proxy, it will cause problems.
  2. Special steps need to be taken when updating Drupal core for a site using a Virtual Host Proxy and the Reverse Proxy module, because normally one disables all contributed modules in the process of updating Drupal core but the problems Reverse Proxy module fixes return when it is disabled, which messes up the update. Either of these two approaches should help you avoid problems:
    • Easier but diverging from update instructions: Disable all contributed modules except Reverse Proxy at that stage in the update process
    • Allows following update instructions exactly: Before updating, temporarily comment out your base url in settings.php. Use the long form of the url until after the update is complete. After the update, un-comment the base url in settings.php.
Special thanks are due to Marco Wise, Vijoy Abraham, Zach Chandler, Irina Zaks, and Dustin Selman for their work on this module.

README.txt

SUMMARY

This module provides URL rewrites for integrating Drupal with a Reverse Proxy service. It was developed by the Stanford University Open Source Lab for integrating with the Virtual Host Proxy Service provided by Stanford University ITS.

REQUIREMENTS

The below instructions assume that you have /afs/ir/group/groupname/cgi-bin/drupal as your Drupal installation directory.

  1. Set up a virtual host proxy (http://yourgroup.stanford.edu) to point to your drupal directory:
    • https://www.stanford.edu/group/yourgroup/cgi-bin/drupal
  2. Enable the Reverse Proxy module
  3. In /afs/ir/group/yourgroup/cgi-bin/drupal/.htaccess, set the RewriteBase variable to /group/yourgroup/cgi-bin/drupal
  4. In /afs/ir/group/yourgroup/cgi-bin/sites/default/settings.php set:
    • $base_url = 'http://yourgroup.stanford.edu'; // NO trailing slash!
  5. Go to http://yourgroup.stanford.edu to access your site
  6. (optional) Create a .htaccess file in /afs/ir/group/yourgroup/WWW/ with the following directives:
    • RewriteEngine on
    • RewriteRule (.*) http://yourgroup.stanford.edu/$1 [R=301,L]