FastCGI Installation and Web Server Configuration / FastCGI GAS configuration on various Web Server |
For Apache 2.4 you configure fastCGI with the mod_proxy_fcgi module. If authorization is used, configure a rewrite rule.
In this task you configure your Apache configuration file for mod_proxy_fcgi to connect to a GAS server. The GAS may be on a local or a remote machine.
If you are using authorization headers, see the configuration example in the section Rewrite-rule for authorization headers.
Apache 2.4 does not officially support mod_fastcgi, use mod_proxy_fcgi instead. This module requires Genero Application Server 2.50 (or later). For more information on Apache modules, refer to the Apache documentation.
If you are using authorization headers, the module mod_rewrite must be enabled in your Apache configuration file. For example, the load module directive for this module must appear without the hash (#) at the start of the line:
LoadModule rewrite_module modules/mod_rewrite.so
For more details on Apache, see Apache 2.4 documentation.
An example configuration is shown:
... <VirtualHost _default_> <IfModule proxy_fcgi_module> ... # Unescapes the path component of the request URL SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape # Recreates the authorization header from the %{HTTP:Authorization} variable RewriteEngine on RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Maps the fastcgi server to the GAS URL space ProxyPass /gas/ fcgi://gas-server-ip:gas-server-port/gas/ enablereuse=on timeout=100 # Rewrites URL in response headers ProxyPassReverse /gas/ http://gas-server-ip:gas-server-port/gas/ # No alias </IfModule> </VirtualHost> ...