I read this article to set up virtual host with mod_fastcgi, but I don't quite understand the following configuration:

FastCgiExternalServer /var/www/php5.external -host
AddHandler php5-fcgi .php
Action php5-fcgi /usr/lib/cgi-bin/php5.external
Alias /usr/lib/cgi-bin/ /var/www/

Can someone explain this?

Edit: What confused me is that why alias is used here. Why not use /var/www/php5.external in Action?

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • this is old article, you better install nginx, or upgrade to apache 2.4 and use mod_proxy_fcgi – ADM Jun 21 '15 at 8:50

     ServerName domain.tld
     ServerAlias www.domain.tld

     <IfModule mod_fastcgi.c>
        ## http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html#FastCgiExternalServer
        FastCgiExternalServer /tmp/fpm-domain -idle-timeout 7200  -host
        ## http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
        Alias /tmp/fpm-engine /tmp/fpm-domain

        ## http://httpd.apache.org/docs/2.2/mod/core.html#filesmatch
     <FilesMatch \.php$>
        ## http://httpd.apache.org/docs/2.2/mod/core.html#sethandler
        SetHandler php-fpm
        ## http://httpd.apache.org/docs/2.2/mod/mod_actions.html#action
        Action php-fpm /tmp/fpm-engine

      DocumentRoot /var/www/domain/web

      <Directory /var/www/domain/web>
         ## http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride
         AllowOverride All


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.