From: poltawski Date: Thu, 27 Aug 2009 07:52:11 +0000 (+0000) Subject: lib/setuplib MDL-20166 - Don't abort install on nginx webserver X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7e13a2654ae0afdf097cc4a72df6d6b41be9e6f0;p=moodle.git lib/setuplib MDL-20166 - Don't abort install on nginx webserver Thanks to Jordan for the patch. Jordan has done testing and found nginx seems to work and is planning to do more extensive testing to alert us of other problems along the way. --- diff --git a/lib/setuplib.php b/lib/setuplib.php index 885bba28a3..66f43b08b9 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -493,6 +493,11 @@ function setup_get_remote_url() { $rurl['scheme'] = empty($_SERVER['HTTPS']) ? 'http' : 'https'; $rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded + } else if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) { + //nginx + $rurl['scheme'] = empty($_SERVER['HTTPS']) ? 'http' : 'https'; + $rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded + } else if (stripos($_SERVER['SERVER_SOFTWARE'], 'iis') !== false) { //IIS $rurl['scheme'] = ($_SERVER['HTTPS'] == 'off') ? 'http' : 'https';