[PLUG] variables in apache

Keith Lofstrom keithl at kl-ic.com
Sat May 19 02:59:40 UTC 2007


I've got a very long httpd.conf file, with lots of numbers wired 
in throughout the file that are hard to maintain.  Any Apache gurus
here?  Some questions:

1) Is it possible to define a user variable near the start of
http.conf, and use it later on?  For example:

----------------------------- FAKE EXAMPLE
IPADDRESS=123.45.67.89
...
<VirtualHost $IPADDRESS:80>
...
<VirtualHost $IPADDRESS:443>
------------------------------

2) Is it possible to take whole chunks of configuration and make
parameterized macros out of them?  For example:

------------------------------ FAKE EXAMPLE
macro WIKI1( SITE )
   <Directory /home/www/$SITE/cgi-bin/kwiki/plugin/attachments/>
      Order allow,deny
      Allow from all
   </Directory>
endmacro
...

WIKI1( SITE=fredwiki )
------------------------------

I'm sure it is /somewhere/ in the docs, but I couldn't figure out
the nomenclature to search for.

Keith


-- 
Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs



More information about the PLUG mailing list