Created
October 25, 2013 14:19
-
-
Save micahw156/7155393 to your computer and use it in GitHub Desktop.
Drupal 7 settings.php hacks for operating behind NetIQ Access Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Base URL (optional). | |
* | |
* If Drupal is generating incorrect URLs on your site, which could | |
* be in HTML headers (links to CSS and JS files) or visible links on pages | |
* (such as in menus), fill in the absolute URL to your Drupal installation. | |
* | |
* We have to set $base_url if we're behind a Novell Access Manager proxy. | |
*/ | |
if (isset($_SERVER['HTTP_VIA']) && strpos($_SERVER['HTTP_VIA'], 'Access Gateway')){ | |
$http_via = explode(' ', $_SERVER['HTTP_VIA'], 3); | |
$base_url = 'https://' . $http_via[1]; | |
} | |
/** | |
* Enable this setting to determine the correct IP address of the remote | |
* client by examining information stored in the X-Forwarded-For headers. | |
*/ | |
$conf['reverse_proxy'] = TRUE; | |
/** | |
* reverse_proxy accepts an array of IP addresses. | |
*/ | |
# $conf['reverse_proxy_addresses'] = array('a.b.c.d', ...); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this. Exactly what I needed. I was trying to find a way of avoiding hard-coding the base url behind access manager.