Apache: mod_fastcgi
Module mod_fastcgi is the Apache module for FastCGI support for versions of Apache prior to 2.4.
Note: Assume the Genero Application Server is installed in the following directory
(FGLASDIR): /opt/gas. Make the appropriate substitution for the
FGLASDIR when applying these examples to your own configuration.
Important: Apache 2.4 does not support mod_fastcgi. If you are using Apache 2.4, use
mod_proxy_fcgi instead, see Apache 2.4: mod_proxy_fcgi.
Note: For more information on the Apache modules, refer to the Apache
documentation.
mod_fastcgi installation
Install software package for your system or use these instructions.
mod_fastcgi configuration to manage GAS process
In your Apache configuration file (for example, httpd.conf):
- Enable the load module directive for
mod_fastcgi
by removing the hash symbol (#) from the start of the line. Be aware that your configuration may be different to that shown in the example. - Add the lines to configure fastcgi server and set permissions for the GAS.
LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so
<IfModule fastcgi_module>
FastCgiServer /opt/gas/bin/wrapper.fcgi -idle-timeout 300
-initial-env FGLASDIR=/opt/gas
Alias /gas /opt/gas/bin/wrapper.fcgi
</IfModule>
# set permissions for /gas alias
<Location /gas>
Order Deny,Allow
Deny from all
Allow from mycompany.com
</Location>
In the fastcgi configuration example:
- wrapper.fcgi is a script delivered with GAS installation that
simplifies FastCGI configuration. You can amend this script to add options for
fastcgidispatch, like
-f
to specify a custom configuration file. - /gas directory is just a virtual directory, no need to create one.
- /gas alias permission is set to deny all access to GAS except for clients from mycompany.com. You can modify the alias configuration to your needs. For more details on Apache directives, see Apache documentation.
- "
-idle-timeout
" must be greater than REQUEST_RESULT timeout in GAS configuration. [By default:<REQUEST_RESULT>
: 45 seconds, mod_fastcgi "-idle-timeout
" : 300 seconds]
Using mod_deflate for compression with mod_fastcgi
With an Apache web
server, compression is typically enabled through the mod_deflate module;
however, as the GAS uses it own compression mechanism, we recommend that you disable
mod_deflate
. For more information on disabling mod_deflate
, please
refer to the fastcgi documentation or contact your system administrator.