[Catalyst] Help Deploying on mod-fcgi Rather than mod_fastcgi

Mark Hughes mhughes at law.du.edu
Sun Feb 13 19:51:51 GMT 2011


On 02/13/2011 12:36 PM, Aaron Dancygier wrote:
> Can you post your Apache config.
>
> --Aaron

Here it is the most recent version of the relevant part.  Most is 
boilerplate generated by ISPConfig.  I've made the marked changes near 
the top and commented out the ScriptAlias directive part way down:

[root at mayfly ~]# cat  /etc/httpd/conf/sites-available/sumosrus.spirit.vhost

<Directory /var/www/sumosrus.spirit>
     AllowOverride None
     Order Deny,Allow
     Deny from all
</Directory>

<VirtualHost *:80>

     # changes from here by mhughes per http://blog.hjksolutions.com
     DocumentRoot /var/www/sumosrus.spirit/web/root
#    DocumentRoot /var/www/sumosrus.spirit/web
     Alias /static /var/www/sumosrus.spirit/web/root/static
     <Location /static>
         SetHandler default-handler
     </Location>

     Alias / /var/www/sumosrus.spirit/web/script/sumo_fastcgi.pl/

     <Location />
          Options ExecCGI
          Order allow,deny
          Allow from all
          AddHandler fcgid-script .pl
     </Location>

     # end changes

     ServerName sumosrus.spirit
     ServerAlias www.sumosrus.spirit
     ServerAdmin webmaster at sumosrus.spirit

     ErrorLog /var/log/ispconfig/httpd/sumosrus.spirit/error.log


     ErrorDocument 400 /error/400.html
     ErrorDocument 401 /error/401.html
     ErrorDocument 403 /error/403.html
     ErrorDocument 404 /error/404.html
     ErrorDocument 405 /error/405.html
     ErrorDocument 500 /error/500.html
     ErrorDocument 503 /error/503.html
	
     <Directory /var/www/sumosrus.spirit/web>
         Options FollowSymLinks
         AllowOverride All
         Order allow,deny
         Allow from all

         # ssi enabled
         AddType text/html .shtml
         AddOutputFilter INCLUDES .shtml
         Options +Includes
     </Directory>
     <Directory /var/www/clients/client3/web3/web>
         Options FollowSymLinks
         AllowOverride All
         Order allow,deny
         Allow from all

         # ssi enabled
         AddType text/html .shtml
         AddOutputFilter INCLUDES .shtml
         Options +Includes
     </Directory>


     # cgi enabled
	<Directory /var/www/clients/client3/web3/cgi-bin>
       Order allow,deny
       Allow from all
     </Directory>
#    ScriptAlias  /cgi-bin/ /var/www/clients/client3/web3/cgi-bin/
     AddHandler cgi-script .cgi
     AddHandler cgi-script .pl
     # Clear PHP settings of this website
     <FilesMatch "\.ph(p3?|tml)$">
         SetHandler None
     </FilesMatch>
     # php as fast-cgi enabled
     <IfModule mod_fcgid.c>

	  # SocketPath /tmp/fcgid_sock/
	
	  # IdleTimeout n (3600 seconds)
	  # An idle fastcgi application will be terminated after IdleTimeout 
seconds.
       IdleTimeout 3600
	
	  # ProcessLifeTime n (7200 seconds)
       # A fastcgi application will be terminated if lifetime expired, 
even no error is detected.
       ProcessLifeTime 7200
	
	  # MaxProcessCount n (1000)
       # The max count of total fastcgi process count.
       # MaxProcessCount 1000

	  # DefaultMinClassProcessCount n (3)
       # The minimum number of fastcgi application instances for any one 
fastcgi application.
       # Idle fastcgi will not be killed if their count is less than n
       # Set this to 0, and tweak IdleTimeout
	  DefaultMinClassProcessCount 0
	
	  # DefaultMaxClassProcessCount n (100)
       # The maximum number of fastcgi application instances allowed to 
run for
       # particular one fastcgi application.
       DefaultMaxClassProcessCount 100
	
	  # IPCConnectTimeout n (3 seconds)
       # The connect timeout to a fastcgi application.
       IPCConnectTimeout 8
	
	  # IPCCommTimeout n (20 seconds)
       # The communication timeout to a fastcgi application. Please 
increase this
       # value if your CGI have a slow initialization or slow respond.
       IPCCommTimeout 360

	  # BusyTimeout n (300 seconds)
       # A fastcgi application will be terminated if handing a single 
request
       # longer than busy timeout.
	  BusyTimeout 300
	
     </IfModule>
     <Directory /var/www/sumosrus.spirit/web>
         AddHandler fcgid-script .php .php3 .php4 .php5
         FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
         Options +ExecCGI
         AllowOverride All
         Order allow,deny
         Allow from all
     </Directory>
	<Directory /var/www/clients/client3/web3/web>
         AddHandler fcgid-script .php .php3 .php4 .php5
         FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
         Options +ExecCGI
         AllowOverride All
         Order allow,deny
         Allow from all
     </Directory>

     # add support for apache mpm_itk
     <IfModule mpm_itk_module>
       AssignUserId web3 client3
     </IfModule>

     <IfModule mod_dav_fs.c>
       # DO NOT REMOVE THE COMMENTS!
       # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
       # WEBDAV BEGIN
       # WEBDAV END
     </IfModule>


</VirtualHost>



More information about the Catalyst mailing list