Bluehost.com Web Hosting $6.95

Virtual Host Configuration

This is a discussion on Virtual Host Configuration within the Apache Web Server forums, part of the Web Server and Related Forums category; I have configured http.conf for virtual hosts like this: #NameVirtualHost 1.2.3.4:80 NameVirtualHost myipaddressishere <VirtualHost ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-02-2003
Network Interest
 
Posts: n/a
Default Virtual Host Configuration


I have configured http.conf for virtual hosts like this:

#NameVirtualHost 1.2.3.4:80
NameVirtualHost myipaddressishere

<VirtualHost www.domain1.com>
ServerName fw.domain1.com
ServerAdmin netinterest@domain1.com
DocumentRoot /usr/pkg/share/httpd/htdocs/domain1
ErrorLog /var/log/httpd/error_log
TransferLog /var/log/httpd/access_log
</VirtualHost>

<VirtualHost www.domain2.com>
ServerName fw.domain2.com
ServerAdmin netinterest@domain2.com
DocumentRoot /usr/pkg/share/httpd/htdocs/domain2
ErrorLog /var/log/httpd/error_log
TransferLog /var/log/httpd/access_log
</VirtualHost>

The appropriate web content has been uploaded to
/usr/pkg/share/httpd/htdocs/domain1 and domain2 directories.

When I start httpd, I get:

[Tue Sep 2 08:23:29 2003] [warn] VirtualHost www.domain1.com:80 overlaps
with VirtualHost www.domain2.com:80, the first has precedence, perhaps you
need a NameVirtualHost directive

[Tue Sep 2 08:23:29 2003] [warn] NameVirtualHost ipaddress:80 has no
VirtualHosts

Everything is directed to domain1 content. Any assistance is greatly
appreciated.


  #2 (permalink)  
Old 09-02-2003
Davide Bianchi
 
Posts: n/a
Default Re: Virtual Host Configuration

Network Interest <none@none.com> wrote:
> Everything is directed to domain1 content. Any assistance is greatly
> appreciated.


<VirtualHost www.domain1.com>
<VirtualHost www.domain2.com>

Change both to
<VirtualHost youripaddresshere>

Davide
  #3 (permalink)  
Old 09-02-2003
Network Interest
 
Posts: n/a
Default Re: Virtual Host Configuration

Thanks, it worked!

Page 87 of my newly acquired Apache The Definitive Guide (O'Reilly) seems to
supply incorrect information.

Thanks again.

"Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message
news:bj29a8$egt0d$1@ID-18487.news.uni-berlin.de...
> Network Interest <none@none.com> wrote:
> > Everything is directed to domain1 content. Any assistance is greatly
> > appreciated.

>
> <VirtualHost www.domain1.com>
> <VirtualHost www.domain2.com>
>
> Change both to
> <VirtualHost youripaddresshere>
>
> Davide



  #4 (permalink)  
Old 09-02-2003
Markus G. Klötzer
 
Posts: n/a
Default Re: Virtual Host Configuration

Davide Bianchi <davideyeahsure@onlyforfun.net> wrote:

>
> <VirtualHost www.domain1.com>
> <VirtualHost www.domain2.com>
>
> Change both to
> <VirtualHost youripaddresshere>


On a local (Windows XP) system that would be 127.0.0.1 as I would not
know my dynamic IP Address?

cu

mgk
--
Korpela's 42 Laws about Usenet:
38. The only way to help a heated discussion is to stay away from it.
http://www.cs.tut.fi/~jkorpela/usenet/laws.html
  #5 (permalink)  
Old 09-03-2003
Davide Bianchi
 
Posts: n/a
Default Re: Virtual Host Configuration

Markus G. Klötzer <DengejaaUveso@eze-domains.com> wrote:
> On a local (Windows XP) system that would be 127.0.0.1 as I would not
> know my dynamic IP Address?


Then use NameVirtualHost * and <VirtualHost *>, so he will "connect"
on any available IPs.

Davide
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0