Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:linux:arch_php_fcgid [2012/04/22 22:53]
alex created
en:linux:arch_php_fcgid [2012/04/22 23:18] (current)
alex [PHP via FastCGI under Arch Linux]
Line 9: Line 9:
 </​code>​ </​code>​
  
-FastCGI needs a wrapper or else suexec will get angry, so create one in ''/​srv/​http''​+FastCGI needs a wrapper or else suexec will get angry, so create one in ''/​srv/​http''​:
  
 <​code>​ <​code>​
-# mkdir /var/www/​fcgi-bin.d/​php5-default +# mkdir /srv/http/​fcgi-bin.d/​php5-default 
-# ln -s /usr/bin/php5-cgi /var/www/​fcgi-bin.d/​php5-default/​php-fcgi-wrapper+# ln -s /usr/bin/php-cgi /srv/http/​fcgi-bin.d/​php5-default/​php-fcgi-wrapper
 </​code>​ </​code>​
  
Line 29: Line 29:
 <​IfModule mod_fcgid.c>​ <​IfModule mod_fcgid.c>​
     # Path to php.ini – defaults to /​etc/​phpX/​cgi     # Path to php.ini – defaults to /​etc/​phpX/​cgi
-    DefaultInitEnv PHPRC=/etc/php5/cgi+    DefaultInitEnv PHPRC=/etc/php
     ​     ​
     # Number of PHP childs that will be launched. Leave undefined to let PHP decide.     # Number of PHP childs that will be launched. Leave undefined to let PHP decide.
Line 46: Line 46:
     # Define alias "/​fcgi-bin/"​. The action above is using this value, which means that     # Define alias "/​fcgi-bin/"​. The action above is using this value, which means that
     # you could run another "​php5-cgi"​ command by just changing this alias     # you could run another "​php5-cgi"​ command by just changing this alias
-    Alias /fcgi-bin/ /var/www/​fcgi-bin.d/​php5-default/​+    Alias /fcgi-bin/ /srv/http/​fcgi-bin.d/​php5-default/​
     ​     ​
     # Turn on the fcgid-script handler for all files within the alias "/​fcgi-bin/"​     # Turn on the fcgid-script handler for all files within the alias "/​fcgi-bin/"​
Line 70: Line 70:
 Include conf/​extra/​php5_fcgid.conf Include conf/​extra/​php5_fcgid.conf
 </​code>​ </​code>​
 +
 +Finally, restart apache:
 +
 +<​code>​
 +# rc.d restart httpd
 +</​code>​
 +
 +===== Links =====
 +
 +  * [[http://​www.fastcgi.com/​|FastCGI]]
 +  * [[http://​httpd.apache.org/​mod_fcgid/​|Apache mod_fcgid]]
 +  * [[http://​typo3.org/​documentation/​article/​using-php-with-mod-fcgid/​|Using PHP with mod_fcgid (typo3.org)]]
 +