Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sumanthkumarc/0f1b6f9aa03442c11b007514e95761df to your computer and use it in GitHub Desktop.
Save sumanthkumarc/0f1b6f9aa03442c11b007514e95761df to your computer and use it in GitHub Desktop.
#Put Following Lines in httpd.conf
#Checks if mod_env is loaded and then sets a unconditional Environment variable called "X_Environment"
# Use SetEnvIF for conditional var setting, requires mod_setenvif.c to be loaded
<IfModule mod_env.c>
SetEnv X_Environment Local
</IfModule>
#Checks if mod_headers is loaded and then sets a Response Header called MyHeader with value of environment varuable "X_Environment" set above
# Use http://httpd.apache.org/docs/current/mod/mod_headers.html link for reference
<IfModule mod_headers.c>
Header set MyHeader %{X_Environment}e
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment