Fixing vuln. in php + nginx - config, thx altmir for reporting, fixes #980
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
@@ -619,6 +619,8 @@ class nginx
|
||||
if($domain['phpenabled'] == '1')
|
||||
{
|
||||
$phpopts = "\t".'location ~ \.php$ {'."\n";
|
||||
$phpopts.= "\t\t".'try_files $uri =404;'."\n";
|
||||
$phpopts.= "\t\t".'fastcgi_split_path_info ^(.+\.php)(/.+)$;'."\n";
|
||||
$phpopts.= "\t\t".'fastcgi_index index.php;'."\n";
|
||||
//$phpopts.= "\t\t".'fastcgi_pass ' . $this->settings['system']['nginx_php_backend'] . ';' . "\n";
|
||||
//$phpopts.= "\t\t".'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;'."\n";
|
||||
|
||||
@@ -38,6 +38,8 @@ class nginx_phpfpm extends nginx
|
||||
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
||||
|
||||
$php_options_text = "\t".'location ~ \.php$ {'."\n";
|
||||
$php_options_text.= "\t\t".'try_files $uri =404;'."\n";
|
||||
$php_options_text.= "\t\t".'fastcgi_split_path_info ^(.+\.php)(/.+)$;'."\n";
|
||||
$php_options_text.= "\t\t".'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ';' . "\n";
|
||||
$php_options_text.= "\t\t".'fastcgi_index index.php;'."\n";
|
||||
$php_options_text.= "\t\t".'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;'."\n";
|
||||
|
||||
Reference in New Issue
Block a user