- add 'fastcgi_param HTTPS on' for nginx+fpm if domain uses SSL, fixes #610
This commit is contained in:
@@ -40,6 +40,9 @@ class nginx_phpfpm extends nginx
|
|||||||
$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') {
|
||||||
|
$php_options_text.= "\t\t".'fastcgi_param HTTPS on;'."\n";
|
||||||
|
}
|
||||||
$php_options_text.= "\t\t".'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;'."\n";
|
$php_options_text.= "\t\t".'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;'."\n";
|
||||||
$php_options_text.= "\t\t".'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ';' . "\n";
|
$php_options_text.= "\t\t".'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ';' . "\n";
|
||||||
$php_options_text.= "\t".'}'."\n";
|
$php_options_text.= "\t".'}'."\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user