Merge branch 'stable-3.1' of github.com:AlternC/AlternC into stable-3.1

This commit is contained in:
Benjamin Sonntag 2017-08-12 16:46:45 +02:00
commit be63ec7192
2 changed files with 4 additions and 2 deletions

View File

@ -167,7 +167,7 @@ $err = new m_err();
$authip = new m_authip();
$hooks = new m_hooks();
if (!isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"]=="https") {
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"]=="https") {
$_SERVER["HTTPS"]="on";
}

View File

@ -9,7 +9,9 @@ if ($argv[1] == "templates") {
// install ssl.conf
echo "[alternc-ssl] Installing ssl.conf template\n";
copy("/etc/alternc/templates/apache2/mods-available/ssl.conf","/etc/apache2/mods-available/ssl.conf");
mkdir("/var/run/alternc-ssl");
if (!is_dir('/var/run/alternc-ssl')) {
mkdir("/var/run/alternc-ssl");
}
chown("/var/run/alternc-ssl","alterncpanel");
chgrp("/var/run/alternc-ssl","alterncpanel");
// replace open_basedir line if necessary :