Skip to content Skip to navigation

Drupal and Virtual Host Proxies on the WWW Servers

Author: 

In fall 2011, the web infrastructure team in IT Services made some changes to how virtual host (vhost) proxies are handled. Previously, all proxies were on a dedicated pool of proxy servers (proxy1.stanford.edu, proxy2.stanford.edu, proxy3.stanford.edu). This configuration required the use of the Reverse Proxy module. The infrastructure team is in the process of moving all existing proxies onto the www servers themselves. If you are an owner of an existing vhost proxy, you should have received an email detailing the changes.

Setting Up a Drupal Site with a New Virtual Host Proxy

As of early 2012, new proxies by default are created directly on the www servers, so if you are used to setting up a Drupal install for a vhost proxy on the proxy server, configuration requires a few different settings:

  • In your .htaccess file, set your RewriteBase to the following:
    RewriteBase /
  • Do not install the Reverse Proxy module (or disable it if installed)
  • WebAuth Module for Drupal (WMD) 2.x settings:
    • In webauth/wa_base.inc, set the $base variable as follows
      $base = 'https://yourvanityurl.stanford.edu';
    • In the {variable} table of the database, set the webauth_base variable to https://yourvanityurl.stanford.edu (example below, using drush):
      drush vset webauth_base https://yourvanityurl.stanford.edu

How to Tell Where Your Virtual Host Proxy Is Located

To determine whether your vhost proxy is on the www servers or the proxy servers, you can simply run the command:
host myvanityurl.stanford.edu
from a Terminal window./>

If it returns:
proxy-service.best.stanford.edu
then it's on the proxy servers./>

If it returns:
www-v6.stanford.edu
then it's on the www servers./>

See http://techcommons.stanford.edu/topics/drupal/boost#getting-ready for a screenshot of what that looks like in action.