|
Fast CGI using Apache module mod_fcgid
|
All pre-configured ZeroXII servers have PHP installed as an Apache module. An alternative is to install and run PHP as fast CGI using Apache module mod_fcgid. This page covers updating a pre-configured ZeroXII server to run PHP as fast cgi in addition provides a step-by-step guide to creating a bespoke server using the available modules.
Updating a pre-configured ZeroXII server to run PHP as fast cgi
To update a pre-configured ZeroXII server to run PHP as fast cgi proceed as follows:
- If running, stop Uniform Server (Apache and MySQL) from UniController
- If running, exit UniController.
- Download lastest version of fcgi module ZeroXII_apache_fcgid_2_3_9.exe
- Save to folder UniServerZ.
- Double click on the above installation file. This runs the self-extracting archive.
- If prompted allow overwriting of existing files.
- If you wish; delete the installation file, it is no longer required.
- If they exist delete the following folders :
- \UniServerZ\core\php53
- \UniServerZ\core\php54
- \UniServerZ\core\php55
- \UniServerZ\core\php56
- \UniServerZ\core\php70
- Download modules you require. Download one or all of the following PHP version (use latest version):
- ZeroXII_php_nts_5_3_29.exe
- ZeroXII_php_nts_5_4_45.exe
- ZeroXII_php_nts_5_5_30.exe
- ZeroXII_php_nts_5_6_16.exe
- ZeroXII_php_nts_7_0_0.exe
- Save to folder UniServerZ.
- For each of the above double click on the installation file. This runs the self-extracting archive.
- If prompted allow overwriting of existing files.
- If you wish; delete the installation file, it is no longer required.
Note: Each plugin contains a read-me file providing any additional instructions this is located in folder UniServerZ.
Bespoke server to run PHP as fast cgi
The following provides a complete guide for installing a WAMP (Windows Apache MySQL and PHP) server running PHP as fast cgi. Installing is a misnomer! Nothing is installed to your PCs registry all files are extracted to their appropriate location within the UniServer
folder structure.
To install a WAMP server proceed as follows:
- Download and save the latest controller file (ZeroXII_controller_2_0_0.exe from the Default list) to drive c:
- The file is a self-extracting archive, double click on above file to run the extractor.
- A new folder C:\UniServerZ is created containing the controller application UniController.exe and support folders and files.
- Download and save the latest Apache plugin file (ZeroXII_apache_2_4_17.exe from the Default list) to folder UniServerZ
- The file is a self-extracting archive, double click on above file to run the extractor.
- Download the following plugins (or latest version) and save to folder UniServerZ.
- ZeroXII_apache_fcgid_2_3_9.exe - Apache mod_fcgid.so + httpd.conf (Use module from the Alternative list)
- ZeroXII_mysql_5_6_27.exe - MySQL server (Use module from the Default list)
- ZeroXII_php_nts_7_0_0.exe - PHP (Use PHP modules from the Alternative list)
- ZeroXII_phpmyadmin_4_5_2.exe - Admin for MySQL server (Use module from the Default list)
- For each of the above installation files double click to run the extractor.
- If prompted allow overwriting of existing files.
- If you wish; delete the installation files, they are no longer required.
Note: Each plugin contains a read-me file providing any additional instructions this is located in folder UniServerZ.
Configuration notes
Note 1: The module ZeroXII_apache_fcgid_2_3_9.exe overwrites the configuration file UniServerZ\core\apache2\conf\httpd.conf and adds mod_fcgid.so to the Apache modules folder UniServerZ\core\apache2\modules
Note 2: Parameters in configuration file UniServerZ\core\apache2\conf\httpd.conf
Load module
|
LoadModule fcgid_module modules/mod_fcgid.so
|
Common fcgid module configuration parameters
|
<IfModule fcgid_module>
FcgidIOTimeout 40
FcgidConnectTimeout 10
FcgidMaxProcesses 300
FcgidMaxProcessesPerClass 300
FcgidOutputBufferSize 65536
FcgidProcessLifeTime 0
FcgidMaxRequestsPerProcess 0
FcgidMinProcessesPerClass 0
FcgidFixPathinfo 0
FcgidZombieScanInterval 20
FcgidMaxRequestLen 536870912
FcgidTimeScore 3
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv US_ROOTF "${US_ROOTF}"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
</IfModule>
|
PHP selection is provided by IfDefine directives.
|
<IfDefine php53>
FcgidInitialEnv PATH "${US_ROOTF}/core/php53;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv PHPRC "${US_ROOTF}/core/php53/${PHP_INI_SELECT}"
<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper "${US_ROOTF}/core/php53/php-cgi.exe" .php
</Files>
</IfDefine>
<IfDefine php54>
.....etc
</IfDefine>
<IfDefine php55>
.....etc
</IfDefine>
<IfDefine php56>
.....etc
</IfDefine>
<IfDefine php70>
FcgidInitialEnv PATH "${US_ROOTF}/core/php70;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv PHPRC "${US_ROOTF}/core/php70/${PHP_INI_SELECT}"
<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper "${US_ROOTF}/core/php70/php-cgi.exe" .php
</Files>
</IfDefine>
|
Note 3: The above Apache configuration is intended to get you quickly up and running with fast cgi.
You will need to tweak configuration parameters to suit your specific requirements.
For a complete list of directives refer to following page http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
--oOo--
|