From ff4b03f4fabdfe6dd9d608b3215f6dc54cb1ef4b Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Fri, 25 Feb 2011 07:58:13 +0100 Subject: [PATCH] - add 'fastcgi_param HTTPS on' for nginx+fpm if domain uses SSL, fixes #610 --- scripts/jobs/cron_tasks.inc.http.35.nginx_phpfpm.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/jobs/cron_tasks.inc.http.35.nginx_phpfpm.php b/scripts/jobs/cron_tasks.inc.http.35.nginx_phpfpm.php index a5a6eacd..2a8746f2 100644 --- a/scripts/jobs/cron_tasks.inc.http.35.nginx_phpfpm.php +++ b/scripts/jobs/cron_tasks.inc.http.35.nginx_phpfpm.php @@ -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";