Computing.Net > Forums > Linux > Problem, httpd n virtual host(ing)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Problem, httpd n virtual host(ing)

Reply to Message Icon

Name: bobo77
Date: December 22, 2003 at 19:32:38 Pacific
OS: Redhat 9
CPU/Ram: 1 / 512
Comment:

Ok im using apache 2 with redhat 9

if i have this under my virutal hosts everythings fine (httpd.conf)

<VirtualHost 127.0.0.1>
ServerName www.nbe.com
DocumentRoot /home/www/nbe
NameVirtualHost 127.0.0.1
ServerAlias nbe.com www.nbe.com
</VirtualHost>

Everythings fine www.nbe.com comes up with my index page

If i make this the listing for virutal hosts

<VirtualHost 127.0.0.1>
ServerName www.nbe.com
DocumentRoot /home/www/nbe
NameVirtualHost 127.0.0.1
ServerAlias nbe.com www.nbe.com
</VirtualHost>

<VirtualHost *:8080>

</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName www.trail.com
DocumentRoot /home/www/trail
NameVirtualHost 127.0.0.1
ServerAlias trail.com www.trail.com
</VirtualHost>

<VirtualHost *:8080>

</VirtualHost>

then i get this error message when restarting httpd -k restart

[Mon Dec 22 22:26:55 2003] [warn] _default_ VirtualHost overlap on port 8080, the first has precedence


[Mon [Mon Dec 22 22:26:55 2003] [warn] NameVirtualHost 127.0.0.1:0 has no VirtualHosts

nbe still comes up but the 2nd site dont

what should i be doing instead of above?

i only have my localhost to resolve local webpages ive made?

i know i can do virutal hosting off one ip address so wheres the mistake im making?



Sponsored Link
Ads by Google

Response Number 1
Name: bobo77
Date: December 22, 2003 at 20:30:07 Pacific
Reply:

Ok i fixed my initial error i changed the
httpd.conf to this

<VirtualHost 127.0.0.1>
ServerName www.nbe.com
DocumentRoot /home/www/nbe
NameVirtualHost 127.0.0.1
ServerAlias nbe.com www.nbe.com
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName www.troy.com
DocumentRoot /home/www/troy
NameVirtualHost 127.0.0.1
ServerAlias troy.com
</VirtualHost>

now i get this error

[Mon Dec 22 23:29:36 2003] [warn]
NameVirtualHost 127.0.0.1:0 has no
VirtualHosts

both websites are able to pull up but
why is it warning me?


0

Response Number 2
Name: bobo77
Date: December 22, 2003 at 20:46:34 Pacific
Reply:

Nevermind I fixed it , obviously it was my layout for the VH....................I love when i figure out stuff by my self.....


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


dual booting...differentl... eth0 installed.... now wh...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Problem, httpd n virtual host(ing)

Virtual Host Problems www.computing.net/answers/linux/virtual-host-problems/22864.html

Bind, reverse dns and virtual hosting www.computing.net/answers/linux/bind-reverse-dns-and-virtual-hosting/9774.html

Virtual Hosts and DNS question www.computing.net/answers/linux/virtual-hosts-and-dns-question/21128.html