Permalink
Browse files

Merge branch 'w05_MDL-26182_20_nginx' of git://github.com/skodak/moodle

  • Loading branch information...
2 parents 2b1f6ce + 28ec73d commit 43bbf288494f7341345168ae558b2b83a267f1e2 @stronk7 stronk7 committed Jan 31, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/setuplib.php
View
@@ -750,6 +750,9 @@ function setup_get_remote_url() {
} else if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
//nginx - not officially supported
+ if (!isset($_SERVER['SCRIPT_NAME'])) {
+ die('Invalid server configuration detected, please try to add "fastcgi_param SCRIPT_NAME $fastcgi_script_name;" to the nginx server configuration.');
+ }
$rurl['scheme'] = empty($_SERVER['HTTPS']) ? 'http' : 'https';
$rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded

0 comments on commit 43bbf28

Please sign in to comment.