Uncommented second

$install_dir = array_pop($cur_dir);

line. Issue was happening because nginx doesn't add a trailing slash to DOCUMENT_ROOT. Simple change to nginx configuration adds that so no need to edit the code here.

Fixed conflict with AUTHORS.md
This commit is contained in:
Mohammad Al-Shami
2015-05-11 00:09:14 +03:00
parent 6e27d888c3
commit ed0218dba7
2 changed files with 2 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ Contributors to LibreNMS:
- Stuart Henderson <stu@spacehopper.org> (sthen)
- Filippo Giunchedi <filippo@esaurito.net> (filippog)
- Lasse Leegaard <lasse@brandbil.dk> (lasseleegaard)
- Mickael Marchand <mmarchand@corp.free.fr> (mmarchand)
- Mohammad Al-Shami <mohammad@al-shami.net> (mohshami)
[1]: http://observium.org/ "Observium web site"

View File

@@ -33,7 +33,7 @@ include("../includes/defaults.inc.php");
// Work out the install directory
$cur_dir = explode('/',$_SERVER['DOCUMENT_ROOT']);
$install_dir = array_pop($cur_dir);
#$install_dir = array_pop($cur_dir);
$install_dir = array_pop($cur_dir);
$install_dir = implode('/',$cur_dir);
$config['install_dir'] = $install_dir;
$config['log_dir'] = $install_dir.'/logs';