httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Moseley <mose...@hank.org>
Subject [users@httpd] variable substitution in httpd.conf
Date Mon, 30 Oct 2006 16:24:02 GMT
Bad subject, but I normally generate my httpd.conf files via a
templating system so this isn't an issue, but yesterday I was working
on a config that listened on multiple IP addresses for name-based
virtual hosting.  That is:

    Listen 1.1.1.1:80
    Listen 1.1.1.2:80

    NameVirtualhost 1.1.1.1:80
    <VirtualHost 1.1.1.1:80>
        ServerName foo
    </VirtualHost>

    <VirtualHost 1.1.1.1:80>
        ServerName bar
    </VirtualHost>

    NameVirtualhost 1.1.1.2:80
    <VirtualHost 1.1.1.2:80>
        ServerName foo
    </VirtualHost>

    <VirtualHost 1.1.1.2:80>
        ServerName bar
    </VirtualHost>

I was wondering if there is a way to write that symbolically as I do
when using a templating system to build httpd.conf?

The reason this came up is I was moving to new IP addresses and was
wondering why I was typing the same value in more than one place.

That is:

    address_1 = 1.1.1.1:80
    address_2 = 1.1.1.2:80

    Listen address_2
    Listen address_2


    NameVirtualaddress_ address_1
    <Virtualaddress_ address_1>
        ServerName foo
    </Virtualaddress_>

    <Virtualaddress_ address_1>
        ServerName bar
    </Virtualaddress_>

    NameVirtualaddress_ address_2
    <Virtualaddress_ address_2>
        ServerName foo
    </Virtualaddress_>

    <Virtualaddress_ address_2>
        ServerName bar
    </Virtualaddress_>


-- 
Bill Moseley
moseley@hank.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message