Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Support Apache environment variables #1179

Open
jeffkaufman opened this issue Nov 10, 2015 · 5 comments
Open

Support Apache environment variables #1179

jeffkaufman opened this issue Nov 10, 2015 · 5 comments

Comments

@jeffkaufman
Copy link
Contributor

In Nginx we support setting script variables; in Apache this would be useful as well. For example, see https://groups.google.com/d/msgid/mod-pagespeed-discuss/CAHRWggQSZ-0Nf6VqvRrRXLw3EYWxO8kegXqErG-%3DYf9FVgDshw%40mail.gmail.com?utm_medium=email&utm_source=footer

Apache doc: https://httpd.apache.org/docs/2.2/env.html

@morlovich
Copy link
Contributor

When do the nginx ones evaluate?

@jeffkaufman
Copy link
Contributor Author

Nginx ones are parsed and "compiled" when we load the configuration, and then evaluated at request time.

@sirshurf
Copy link

Subscribing myself as this is something I really need (I was the poster of #1175).

@rexmac
Copy link

rexmac commented Sep 13, 2016

My team has recently implemented experiments via ModPagespeedRunExperiment, but we're struggling to come up with a way of specifying different GA web property IDs for different environments. We think that support for env variables would be very helpful in this regard so that we could do something akin to:

<If env('SERVER_ENV') == 'production'>
    ModPagespeedAnalyticsID UA-XXXXXXX-Y
</If>
<Else>
    ModPagespeedAnalyticsID UA-XXXXXXX-Z
</Else>

@phuib
Copy link

phuib commented Dec 16, 2016

This would be great for setting up many different websites without having to hard code everything into the apache configs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants