FastCGI GAS configuration on various Web Server / Apache 2.4: mod_proxy_fcgi |
Configure Apache 2.4 fastCGI with mod_proxy_fcgi module for a remote GAS server.
If you are configuring mod_proxy_fcgi to connect to a remote GAS server, the requirement for the modules and the configuration details are similar to those described in Apache 2.4: mod_proxy_fcgi; you just need to configure the Apache configuration file as shown in the examples here.
... <IfModule mod_proxy_fcgi.c> #No PATH_INFO with mod_proxy_fcgi unless this is set SetEnvIf Request_URI . proxy-fcgi-pathinfo=1 ProxyPass /gas/ http://<gas-server-ip>:<gas-server-port>/gas/ enablereuse=on Alias /gas /opt/gas/bin/fastcgidispatch </IfModule> ...
For example, an authorization request will cause a redirect to an authentication server and Apache adjusts this URL to the local URL before forwarding the HTTP redirect response to the client. For more details on Apache directives, see Apache 2.4 documentation.
... <IfModule mod_proxy_fcgi.c> #No PATH_INFO with mod_proxy_fcgi unless this is set SetEnvIf Request_URI . proxy-fcgi-pathinfo=1 # Need to rewrite authorization header RewriteEngine on RewriteRule .* - [E=HTTP_AUTHORIZATION:% {HTTP:Authorization}] ProxyPass /gas/ http://<gas-server-ip>:<gas-server-port>/gas/ enablereuse=on Alias /gas /opt/gas/bin/fastcgidispatch ProxyPassReverse /gas/ http://<gas-server-ip>:<gas-server-port>/gas/ </IfModule> ...