Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

@jeffkaufman jeffkaufman commented Nov 10, 2015

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

@morlovich morlovich commented Nov 10, 2015

When do the nginx ones evaluate?

@jeffkaufman
Copy link
Contributor Author

@jeffkaufman jeffkaufman commented Nov 10, 2015

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

@sirshurf
Copy link

@sirshurf sirshurf commented Nov 15, 2015

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

@rexmac
Copy link

@rexmac 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 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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants