You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ap...@ursokr.com on 2004/08/19 23:56:23 UTC

[users@httpd] Problems with IFDefine nesting in Apache 2

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?

Thanks,

John R. Tipton
apache@ursokr.com


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


Re: [users@httpd] Newbie help

Posted by Me <me...@yzix.org>.
have you tried http://127.0.0.1

----- Original Message ----- 
From: "Rich Bowen" <rb...@rcbowen.com>
To: <us...@httpd.apache.org>
Sent: Friday, August 20, 2004 6:35 AM
Subject: Re: [users@httpd] Newbie help


> On Fri, 20 Aug 2004, Ted Shaw wrote:
>
> > G'day
> >
> > I'm using Apache 1.3.14 with Win2000 - it installs and runs but I can't
find Localhost. when I type:
> > http://localhost, I get the standard page unavailable message. I have
changed the config file to:
> > ServerName localhost.
> >
> > Any help greatly appreciated. I did check the faq but couldn't find
anything useful. Maybe due to my lack of knowledge.
>
> It's likely that the server process is not running at all. Are you sure
> you started it?
>
> Also, Apache 1.3.14 is very very old. Consider installing a more recent
> version, which will run better on Windows, and will have many fewer
> bugs. (Or at least different ones ;)
>
> -- 
> Most great hackers are not so much amazed by their own brilliance, so
> much as mystified at everyone else's incompetence. -- Paul Graham
>
> ---------------------------------------------------------------------
> 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
>
>
>


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


Re: [users@httpd] Newbie help

Posted by Rich Bowen <rb...@rcbowen.com>.
On Fri, 20 Aug 2004, Ted Shaw wrote:

> G'day
> 
> I'm using Apache 1.3.14 with Win2000 - it installs and runs but I can't find Localhost. when I type:
> http://localhost, I get the standard page unavailable message. I have changed the config file to:
> ServerName localhost.
> 
> Any help greatly appreciated. I did check the faq but couldn't find anything useful. Maybe due to my lack of knowledge.

It's likely that the server process is not running at all. Are you sure
you started it?

Also, Apache 1.3.14 is very very old. Consider installing a more recent
version, which will run better on Windows, and will have many fewer
bugs. (Or at least different ones ;)

-- 
Most great hackers are not so much amazed by their own brilliance, so
much as mystified at everyone else's incompetence. -- Paul Graham

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


Re: [users@httpd] Newbie help

Posted by Christopher Nash <bi...@yahoo.com>.
Might want to change your name to something other than local host. Alos I think this will make any diffrence but use 127.0.0.1 in your address bar. 
 
Did you start Apache? Sorry but I got to ask the question. 
 
I'm also some what of a newbie but I have Apache running on Linux and XP. Once you get the hange of it you will not go to anything else ;)

Ted Shaw <te...@optusnet.com.au> wrote:
G'day
 
I'm using Apache 1.3.14 with Win2000 - it installs and runs but I can't find Localhost. when I type:
http://localhost, I get the standard page unavailable message. I have changed the config file to:
ServerName localhost.
 
Any help greatly appreciated. I did check the faq but couldn't find anything useful. Maybe due to my lack of knowledge.
 
Thanks,
 
Ted


		
---------------------------------
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.

[users@httpd] Newbie help

Posted by Ted Shaw <te...@optusnet.com.au>.
G'day

I'm using Apache 1.3.14 with Win2000 - it installs and runs but I can't find Localhost. when I type:
http://localhost, I get the standard page unavailable message. I have changed the config file to:
ServerName localhost.

Any help greatly appreciated. I did check the faq but couldn't find anything useful. Maybe due to my lack of knowledge.

Thanks,

Ted

Re: [users@httpd] Problems with IFDefine nesting in Apache 2

Posted by Joshua Slive <js...@gmail.com>.
On Fri, 20 Aug 2004 11:09:09 -0400 (EDT), apache@ursokr.com
<ap...@ursokr.com> wrote:
> VirtualHost *:80 would work but we use dedicated IPs in production.  This
> would make it listen on all IPs in Production.   Is there a better way to
> do this?  It worked great in Apache 1.3.

You can use the Listen directive rather than the VirtualHost directive
to restrict what apache-as-a-whole listens to.

The key to remember, however, is that httpd.conf is not a programming
language.  It is a configuration file.  If you need complicated stuff,
use a pre-processor.

Joshua.

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


Re: [users@httpd] Problems with IFDefine nesting in Apache 2

Posted by ap...@ursokr.com.
VirtualHost *:80 would work but we use dedicated IPs in production.  This
would make it listen on all IPs in Production.   Is there a better way to
do this?  It worked great in Apache 1.3.

Thanks for the help,

John R. Tipton
apache@ursokr.com

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



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


Re: [users@httpd] Problems with IFDefine nesting in Apache 2

Posted by Rich Bowen <rb...@rcbowen.com>.
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