httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Bowen <rbo...@rcbowen.com>
Subject Re: [users@httpd] Problems with IFDefine nesting in Apache 2
Date Thu, 19 Aug 2004 22:58:53 GMT
On Thu, 19 Aug 2004 apache@ursokr.com wrote:

> We have been running apache 1.3 for years on Linux and Windows.
> We are migrating our windows Apache Servers to 2.0 but have run
> into a problem with IFDefine.
> 
> We start Apache with -D DEVELOPMENT, -D TEST or -D PRODUCTION
> depending on which server it is.  This lets us use one config
> file and syncronize it between servers.
> 
> Config looks something like this:
> <IFDefine DEVELOPMENT>
>   <Virtualhost 10.130.4.7:80>
> </IFDefine>
> <IFDefine TEST>
>   <Virtualhost 192.168.1.6:80>
> </IFDefine>
> <IFDefine PRODUCTION>
>   <Virtualhost 65.202.76.4:80>
> </IFDefine>
> 
> After upgrading to Apache 2.0 we get the following error:
> Syntax error on line 14 of
> E:/Inetpub/websites/45th_comps/config/45th_comps.conf:
> Expected </Virtualhost> but saw </IFDefine>
> 
> This worked fine before, I think it has something to do with how the
> tags are nested, is there any way to get this to work in Apache 2.0?
> 
> Is this a known issue?  Just not supported?

That syntax isn't really supposed to work in 1.3 either. :-)
You might consider using VirtualHost *:80 instead, which will remove the
need to do this kind of switching at all.

-- 
Rich Bowen - Rbowen@RCBowen.com
Apache Cookbook - http://www.oreilly.com/catalog/apacheckbk/

---------------------------------------------------------------------
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