Apache: configure for reverse proxy
An Apache reverse proxy configuration allows you to get the URL used by the GAS when a reverse proxy server is used.
Simplifying the configuration
In your network
configuration for reverse proxy it is recommended to use the same URI (for example,
/gas
) for the reverse proxy as the backends where the GAS is running. This means that you will not need to do any further
configuration than what is outlined in the steps in this task.
ProxyFCGISetEnvIf "true" SCRIPT_NAME "/main"
When the GAS sits behind a proxy, the Apache reverse proxy configuration ensures the GAS URLs are reachable provided the following
X-Forwarded
headers are available: X-Forwarded-Proto (protocol should contain HTTP
or HTTPS) and X-Forwarded-Host (host:port).
The GAS will automatically use these header values (if present) to build the URL used by the client.
In this task, you configure Apache for the
X-Forwarded
headers. For more information on forwarded HTTP headers, see rfc7239.