Adapt to work with mod_fastcgi or mod_proxy_fcgi

tags/0.0.1_0.fc26_el5
Daniel Berteaud 8 years ago
parent c01d59f523
commit f950348e8a
  1. 10
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule81FastCGI
  2. 27
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig

@ -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'){ 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 { else {
$OUT .= "LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so\n"; $OUT .=<<_EOF;
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
_EOF
} }
} }

@ -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
<Location /php-cgi-bin/php-wrapper>
Allow from all
</Location>
# 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'
}
}
Loading…
Cancel
Save