mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
Merge branch 'w05_MDL-26182_20_nginx' of git://github.com/skodak/moodle
This commit is contained in:
commit
43bbf28849
1 changed files with 3 additions and 0 deletions
|
@ -750,6 +750,9 @@ function setup_get_remote_url() {
|
||||||
|
|
||||||
} else if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
|
} else if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
|
||||||
//nginx - not officially supported
|
//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['scheme'] = empty($_SERVER['HTTPS']) ? 'http' : 'https';
|
||||||
$rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
|
$rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue