You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by D Kelmi <mi...@laudlink.ru> on 2003/12/05 07:27:33 UTC

Re[2]: [users@httpd] NameVirtualHost * with

> Date: Thu, 4 Dec 2003 07:28:55 -0500
> To: <us...@httpd.apache.org>, "MiksIr" <mi...@laudlink.ru>
> From: "Norman Peelman" <np...@cfl.rr.com>
> Subject: Re: [users@httpd] NameVirtualHost * with <VirtualHost IP>
> Message-ID: <00...@normanttfpd3q8>
> 
> ----- Original Message ----- 
> From: "MiksIr" <mi...@laudlink.ru>
> To: <us...@httpd.apache.org>
> Sent: Thursday, December 04, 2003 2:46 AM
> Subject: [users@httpd] NameVirtualHost * with <VirtualHost IP>
> 
>> Hello all,
>> 
>>      apache 2.0.48
>> 
>> NameVirtualHost *
>> 
>> <VirtualHost *>
>>      DocumentRoot ...
>>      ServerName empty.somedomain
>> </VirtualHost>
>> 
>> <VirtualHost *>
>>      DocumentRoot ...
>>      ServerName www.somedomain
>> </VirtualHost>
>> 
>>     This is work nice. Make some changes.
>> 
>> NameVirtualHost *
>> 
>> <VirtualHost *>
>>      DocumentRoot ...
>>      ServerName empty.somedomain
>> </VirtualHost>
>> 
>> <VirtualHost 1.2.3.4>
>>      DocumentRoot ...
>>      ServerName www.somedomain
>> </VirtualHost>
>> 
>>    But now for 1.2.3.4 run _ip-based_ virtual hosting. As result, for
>>    requests to 1.2.3.4 always answer second virtualhost. And more, if
>>    i add third virtualhost this 1.2.3.4 IP, apache generate warning
>>    about overlaps.
>>    I think, that's wrong, because NameVirtualHost * say, what for
>>    all IP run name-based virtual hosting.
>> 
> 
>   Try this (notice two NameVirtualHost directives):
> 
> NameVirtualHost empty.somedomain.com
> <VirtualHost empty.somedomain.com>
>       DocumentRoot ...
>       ServerName empty.somedomain
>       DirectoryIndex index.htm index.html
>       ErrorLog logs/empty_somedomain_log
>       CustomLog logs/empty_somedomain_log common
> </VirtualHost>
> 
> NameVirtualHost www.somedomain.com
> <VirtualHost www.somedomain.com>
>       DocumentRoot ...
>       ServerName www.somedomain.com
> 
>       DirectoryIndex index.htm index.html
>       ErrorLog logs/www_somedomain_log
>       CustomLog logs/www_somedomain_log common
> </VirtualHost>
> 
> Now if you need to change one to ip based addressing you can...

 empty and www have the same IP. empty - it's default virtualhost for
 all IP. If someone come to any IP with unknown Host - empty must
 answer. Now I make this:
 NameVirtualHost *
 <VirtualHost *> empty </VirtualHost>
 <VirtualHost *> www </VirtualHost>
 and other VirtualHosts this * - it's work.
 But i want use for all my vhosts (except empty) with IP. Construction
 NameVirtualHost *
 <VirtualHost *> empty </VirtualHost>
 <VirtualHost IP> www </VirtualHost>
 and other VirtualHosts this IP - it's must be work, but not working.
 I think, it's bug.


---------------------------------------------------------------------
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] New User 101 question: How do you open and saveyou httpd.conf file

Posted by "Jerry P." <ok...@desidesh.com>.
Kent,
After you've made changes to your httpd.conf file, just hit 'ctrl + s'
and it will save the file. If Notepad for some reason adds '.txt' after
the filename, just remove the '.txt' and move the file to your server.
~jerry


-----Original Message-----
From: Patrick O'Neal [mailto:patrick@oneal.net] 
Sent: Saturday, December 06, 2003 10:24 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] New User 101 question: How do you open and
saveyou httpd.conf file

In the real world, we wouldn't need this, because everyone uses
Unix/Linux and VI or gEdit and they don't try to control things for you,
they just do what you tell them to!!

Sorry for taking up bandwith please don't ban me!

LONG LIVE VI the best editor in the world (as far as I am concerned)<--
this coming from an EX I repeat EX windows dependent IT guy. Praise God
for deliverance!


On Sat, 2003-12-06 at 13:43, Jeff White wrote:
> From: "Kent Healey" 
> 
> > 
> > So I select the note pad. (so far so good?)
> > 
> > Then if I change a line of it, what do I save 
> > it as? The note pad can only
> > save as text as far as I can tell. 
> >
> 
> How Notepad and other Windows Apps save files.
> 
> Applications Using Common Dialogs Append Default Extension 
> http://support.microsoft.com/default.aspx?scid=kb;en-us;125708
> 
> 
> Jeff
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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




---------------------------------------------------------------------
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] New User 101 question: How do you open and save you httpd.conf file

Posted by Patrick O'Neal <pa...@oneal.net>.
In the real world, we wouldn't need this, because everyone uses
Unix/Linux and VI or gEdit and they don't try to control things for you,
they just do what you tell them to!!

Sorry for taking up bandwith please don't ban me!

LONG LIVE VI the best editor in the world (as far as I am concerned)<--
this coming from an EX I repeat EX windows dependent IT guy. Praise God
for deliverance!


On Sat, 2003-12-06 at 13:43, Jeff White wrote:
> From: "Kent Healey" 
> 
> > 
> > So I select the note pad. (so far so good?)
> > 
> > Then if I change a line of it, what do I save 
> > it as? The note pad can only
> > save as text as far as I can tell. 
> >
> 
> How Notepad and other Windows Apps save files.
> 
> Applications Using Common Dialogs Append Default Extension 
> http://support.microsoft.com/default.aspx?scid=kb;en-us;125708
> 
> 
> Jeff
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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] New User 101 question: How do you open and save you httpd.conf file

Posted by Jeff White <jl...@earthlink.net>.
From: "Kent Healey" 

> 
> So I select the note pad. (so far so good?)
> 
> Then if I change a line of it, what do I save 
> it as? The note pad can only
> save as text as far as I can tell. 
>

How Notepad and other Windows Apps save files.

Applications Using Common Dialogs Append Default Extension 
http://support.microsoft.com/default.aspx?scid=kb;en-us;125708


Jeff




---------------------------------------------------------------------
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] New User 101 question: How do you open and save you httpd.conf file

Posted by Kyle Dent <kd...@seaglass.com>.
On Fri, 5 Dec 2003, Kent Healey wrote:

> When I install Apache (I've had to do it a few times now) and I find my
> httpd.conf file, It does not open normaly.
>
> The windows list pops up and say select which program you would like to open
> this file with.
>
> So I select the note pad. (so far so good?)
>
> Then if I change a line of it, what do I save it as? The note pad can only
> save as text as far as I can tell. So I have save mine as text.
>
> I am begining to get the feeling that this is not the way to change your
> httpd.conf file.
>
> Last time I changed it, it messed everything up, so I simply saved it back
> to the way that it was in the first place (however, since I opened and saved
> it with note book ands save it as a txt file it wasn't the exact same as it
> was in the first place) Or was it?
>
> Thanks for any advice.

You may be running into a problem with Notepad automatically
appending .txt onto the filename when it saves it. You can get
around this by putting the file name in quotation marks
("httpd.conf") when you save it.

Notepad is perfectly suitable to edit Apache configuration files.
(Now everyone can chime in with their favorite Windows text
editors...)

Kyle


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


[users@httpd] New User 101 question: How do you open and save you httpd.conf file

Posted by Kent Healey <kh...@email.com>.
When I install Apache (I've had to do it a few times now) and I find my
httpd.conf file, It does not open normaly.

The windows list pops up and say select which program you would like to open
this file with.

So I select the note pad. (so far so good?)

Then if I change a line of it, what do I save it as? The note pad can only
save as text as far as I can tell. So I have save mine as text.

I am begining to get the feeling that this is not the way to change your
httpd.conf file.

Last time I changed it, it messed everything up, so I simply saved it back
to the way that it was in the first place (however, since I opened and saved
it with note book ands save it as a txt file it wasn't the exact same as it
was in the first place) Or was it?

Thanks for any advice.


---------------------------------------------------------------------
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] NameVirtualHost * with

Posted by Jez Hancock <je...@munk.nu>.
On Fri, Dec 05, 2003 at 09:27:33AM +0300, D Kelmi wrote:
>  empty and www have the same IP. empty - it's default virtualhost for
>  all IP. If someone come to any IP with unknown Host - empty must
>  answer. Now I make this:
>  NameVirtualHost *
>  <VirtualHost *> empty </VirtualHost>
>  <VirtualHost *> www </VirtualHost>
>  and other VirtualHosts this * - it's work.
>  But i want use for all my vhosts (except empty) with IP. Construction
>  NameVirtualHost *
>  <VirtualHost *> empty </VirtualHost>
>  <VirtualHost IP> www </VirtualHost>
>  and other VirtualHosts this IP - it's must be work, but not working.
>  I think, it's bug.
It doesn't work because if a request comes in on <IP> address then the
first vhost entry corresponding to that specific <IP> address will be
used (which is 'www' by default).

Try using IP addresses everywhere in stead of * wildcards - see the
inline comments below:

# First IP address:
NameVirtualHost 1.1.1.1

<VirtualHost 1.1.1.1>
	# this config is used only if a request is made to 1.1.1.1 and no
	# corresponding vhost exists for the requested name:
	[ first vhost entry for 1.1.1.1 ]
</VirtualHost>

# ... other vhost entries to be served on 1.1.1.1

<VirtualHost 1.1.1.1>
	[ last vhost entry for 1.1.1.1 ]
</VirtualHost>

# Second IP address:
NameVirtualHost 2.2.2.2

<VirtualHost 2.2.2.2>
	# this config is used only if a request is made to 2.2.2.2 and no
	# corresponding vhost exists for the requested name:
	[ first vhost entry for 2.2.2.2 ]
</VirtualHost>

# ... other vhost entries to be served on 2.2.2.2

<VirtualHost 2.2.2.2>
	[ last vhost entry for 2.2.2.2 ]
</VirtualHost>

Not entirely sure I understand you though, if this isn't right you might
want to provide some concrete examples.

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/

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