Can PHP be run in Apache via mod_php and mod_fcgi side by side?
Posted
by
Mario Parris
on Server Fault
See other posts from Server Fault
or by Mario Parris
Published on 2011-02-07T15:06:31Z
Indexed on
2011/02/07
15:26 UTC
Read the original article
Hit count: 360
I have an existing installation of Apache (2.2.10 Windows x86) using mod_php and PHP 5.2.6. Can I run another site in a virtual host using FastCGI and a different version of PHP, while stilling running the main site in mod_php?
I've made an attempt, but when I add my FCGI settings to the virtual host container, Apache is unable to restart.
httpd.conf mod_php settings:
LoadModule php5_module "C:\PHP\php-5.2.17-Win32-VC6-x86\php5apache2_2.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:\PHP\php-5.2.17-Win32-VC6-x86"
httpd-vhosts.conf fastcgi settings:
<VirtualHost *:80>
DocumentRoot "C:/Inetpub/wwwroot/site-b/source/public"
ServerName local.siteb.com
ServerAlias local.siteb.com
SetEnv PHPRC "C:\PHP\php-5.3.5-nts-Win32-VC6-x86\php.ini"
FcgidInitialEnv PHPRC "C:\PHP\php-5.3.5-nts-Win32-VC6-x86"
FcgidWrapper "C:\PHP\php-5.3.5-nts-Win32-VC6-x86\php-cgi.exe" .php
AddHandler fcgid-script .php
</VirtualHost>
<Directory "C:/Inetpub/wwwroot/site-b/source/public">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
© Server Fault or respective owner