The PHPRC line consists of the directory where the php.ini file is actually located /etc/ translates to /etc/php.ini. PHP_FCGI_MAX_REQUESTS will be the maximum number of requests applied as an fcgid process will be stopped for and a new one will be launched. PHP_FCGI_CHILDREN also try to define the number of PHP children which will be actually launched.
The php-fcgi-starter scripts will get executed, and they are actually present the directories which must be actually accessed by the web site's owner and group:
PHP Code:
chmod 755 /var/www/php-fcgi-scripts/web1/php-fcgi-starter
chmod 755 /var/www/php-fcgi-scripts/web2/php-fcgi-starter
chown -R web1:web1 /var/www/php-fcgi-scripts/web1
chown -R web2:web2 /var/www/php-fcgi-scripts/web2
Also you can try to create the Apache vhosts for the www.example1.com and www.example2.com. Also you can add the required two vhosts at the end of /etc/httpd/conf/httpd.conf:
Code:
vi /etc/httpd/conf/httpd.conf
PHP Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example1.com
ServerAlias example1.com
ServerAdmin webmaster@example1.com
DocumentRoot /var/www/web1/web/
<IfModule mod_fcgid.c>
SuexecUserGroup web1 web1
PHP_Fix_Pathinfo_Enable 1
<Directory /var/www/web1/web/>
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/web1/php-fcgi-starter .php
Order allow,deny
Allow from all
</Directory>
</IfModule>
# ErrorLog /var/log/apache2/error.log
# CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>
<VirtualHost *:80>
ServerName www.example2.com
ServerAlias example2.com
ServerAdmin webmaster@example2.com
DocumentRoot /var/www/web2/web/
<IfModule mod_fcgid.c>
SuexecUserGroup web2 web2
PHP_Fix_Pathinfo_Enable 1
<Directory /var/www/web2/web/>
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/web2/php-fcgi-starter .php
Order allow,deny
Allow from all
</Directory>
</IfModule>
# ErrorLog /var/log/apache2/error.log
# CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>
Bookmarks