Fixes wrong location declaration for nginx, fixes #749
Thanks to altmir
This commit is contained in:
@@ -44,7 +44,7 @@ class nginx
|
|||||||
/**
|
/**
|
||||||
* indicator whether a customer is deactivated or not
|
* indicator whether a customer is deactivated or not
|
||||||
* if yes, only the webroot will be generated
|
* if yes, only the webroot will be generated
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
private $_deactivated = false;
|
private $_deactivated = false;
|
||||||
@@ -422,6 +422,7 @@ class nginx
|
|||||||
|
|
||||||
$vhost_content.= $this->getLogFiles($domain);
|
$vhost_content.= $this->getLogFiles($domain);
|
||||||
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
||||||
|
|
||||||
if ($this->_deactivated == false) {
|
if ($this->_deactivated == false) {
|
||||||
$vhost_content.= $this->create_pathOptions($domain);
|
$vhost_content.= $this->create_pathOptions($domain);
|
||||||
// $vhost_content.= $this->create_htaccess($domain);
|
// $vhost_content.= $this->create_htaccess($domain);
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ class nginx_phpfpm extends nginx
|
|||||||
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
||||||
|
|
||||||
$php_options_text = "\t".'location ~ \.php$ {'."\n";
|
$php_options_text = "\t".'location ~ \.php$ {'."\n";
|
||||||
$php_options_text.= "\t\t".'fastcgi_index index.php;'."\n";
|
// $php_options_text.= "\t\t".'fastcgi_index index.php;'."\n";
|
||||||
$php_options_text.= "\t\t".'include /etc/nginx/fastcgi_params;'."\n";
|
// $php_options_text.= "\t\t".'include /etc/nginx/fastcgi_params;'."\n";
|
||||||
if ($domain['ssl'] == '1' && $ssl_vhost) {
|
if ($domain['ssl'] == '1' && $ssl_vhost) {
|
||||||
$php_options_text.= "\t\t".'fastcgi_param HTTPS on;'."\n";
|
$php_options_text.= "\t\t".'fastcgi_param HTTPS on;'."\n";
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ class nginx_phpfpm extends nginx
|
|||||||
// create starter-file | config-file
|
// create starter-file | config-file
|
||||||
$php->getInterface()->createConfig($phpconfig);
|
$php->getInterface()->createConfig($phpconfig);
|
||||||
|
|
||||||
// create php.ini
|
// create php.ini
|
||||||
// @TODO make php-fpm support this
|
// @TODO make php-fpm support this
|
||||||
$php->getInterface()->createIniFile($phpconfig);
|
$php->getInterface()->createIniFile($phpconfig);
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ class nginx_phpfpm extends nginx
|
|||||||
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__)))); // /var/www/froxlor, needed for chown
|
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__)))); // /var/www/froxlor, needed for chown
|
||||||
|
|
||||||
$user = $this->settings['phpfpm']['vhost_httpuser'];
|
$user = $this->settings['phpfpm']['vhost_httpuser'];
|
||||||
$group = $this->settings['phpfpm']['vhost_httpgroup'];
|
$group = $this->settings['phpfpm']['vhost_httpgroup'];
|
||||||
|
|
||||||
$domain = array(
|
$domain = array(
|
||||||
'id' => 'none',
|
'id' => 'none',
|
||||||
@@ -99,7 +99,7 @@ class nginx_phpfpm extends nginx
|
|||||||
// create starter-file | config-file
|
// create starter-file | config-file
|
||||||
$php->getInterface()->createConfig($phpconfig);
|
$php->getInterface()->createConfig($phpconfig);
|
||||||
|
|
||||||
// create php.ini
|
// create php.ini
|
||||||
// @TODO make php-fpm support this
|
// @TODO make php-fpm support this
|
||||||
$php->getInterface()->createIniFile($phpconfig);
|
$php->getInterface()->createIniFile($phpconfig);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user