- add 'fastcgi_param HTTPS on' for nginx+fpm if domain uses SSL, fixes #610

This commit is contained in:
Michael Kaufmann (d00p)
2011-02-25 07:58:13 +01:00
parent 215abeb105
commit ff4b03f4fa

View File

@@ -40,6 +40,9 @@ class nginx_phpfpm extends nginx
$php_options_text = "\t".'location ~ \.php$ {'."\n";
$php_options_text.= "\t\t".'fastcgi_index index.php;'."\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_pass unix:' . $php->getInterface()->getSocketFile() . ';' . "\n";
$php_options_text.= "\t".'}'."\n";