diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule81FastCGI b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule81FastCGI index 3439e48..27605be 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule81FastCGI +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule81FastCGI @@ -1,8 +1,14 @@ { +$fastcgi_mod = 'mod_proxy_fcgi'; if (-e '/usr/lib64/httpd/modules/mod_fastcgi.so' || -e '/usr/lib/httpd/modules/mod_fastcgi.so'){ - $OUT .= "LoadModule fastcgi_module modules/mod_fastcgi.so\n"; + $fastcgi_mod = 'mod_fastcgi'; + $OUT .=<<_EOF; +LoadModule fastcgi_module modules/mod_fastcgi.so +_EOF } else { - $OUT .= "LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so\n"; + $OUT .=<<_EOF; +LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so +_EOF } } diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig new file mode 100644 index 0000000..bbe7a44 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig @@ -0,0 +1,27 @@ +{ +if ($fastcgi_mod eq 'mod_fastcgi'){ + $OUT .=<<_EOF; +# mod_fastcgi global config +FastCgiIpcDir /var/run/mod_fastcgi +FastCgiWrapper Off +FastCgiConfig -idle-timeout 40 -maxClassProcesses 1 + + Allow from all + + +# Stock PHP +Action php-fastcgi /php-cgi-bin/php-wrapper +Alias /php-cgi-bin/php-wrapper /var/www/php-cgi-bin/php-wrapper +FastCgiExternalServer /var/www/php-cgi-bin/php-wrapper -socket /var/run/php-fpm/php.sock -pass-header Authorization -idle-timeout 120 + +# PHP 5.6 +Action php56-fastcgi /php-cgi-bin/php56-wrapper +Alias /php-cgi-bin/php56-wrapper /var/www/php-cgi-bin/php56-wrapper +FastCgiExternalServer /var/www/php-cgi-bin/php56-wrapper -socket /var/run/php-fpm/php56.sock -pass-header Authorization -idle-timeout 120 + +_EOF +} +else{ + $OUT .= '# Using mod_proxy_fcgi, no additional config required' +} +}