random1 Posted January 13, 2015 Share Posted January 13, 2015 I'm running the latest version of Apache Server on Windows 7 64-bit. It working fine and set up correctly. I'd like to use ENVIRONMENT VARIABLES or a variable like "%current_directory%" or "..\%current_directory%" in the configuration files for Apache, httpd.conf etc. Is this possible? Is httpd.conf a parsed file, can variables be define and used in it? Help would be much appreciated Quote Link to comment https://forums.phpfreaks.com/topic/293886-using-variables-in-httpdconf/ Share on other sites More sharing options...
random1 Posted January 16, 2015 Author Share Posted January 16, 2015 I've worked out that Enviroment Variables can be reffered to using the syntax: ${VARIABLE} Quote Link to comment https://forums.phpfreaks.com/topic/293886-using-variables-in-httpdconf/#findComment-1503174 Share on other sites More sharing options...
jeffreyappel Posted April 8, 2015 Share Posted April 8, 2015 The values of shell environment variables can be used in configuration file lines using the syntax ${ENVVAR}. If "ENVVAR" is the name of a valid environment variable, the value of that variable is substituted into that spot in the configuration file line, and processing continues as if that text were found directly in the configuration file. (If the ENVVAR variable is not found, the characters "${ENVVAR}" are left unchanged for use by later stages in the config file processing.) Quote Link to comment https://forums.phpfreaks.com/topic/293886-using-variables-in-httpdconf/#findComment-1508487 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.