LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-26-2004, 08:09 AM   #1
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
VirtualHost overlap on port 80


when my new apache server on Fedora Core 2 starts, i get the error message " VirtualHost overlap on port 80"

I am using name virtual hosting.


<VirtualHost *:80>
ServerAdmin webmaster@primary.com
DocumentRoot /var/www/html
ServerName www.primary.com
ServerAlias primary.com *.primary.com
ErrorLog logs/www.primary.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
#
<VirtualHost *:80>
ServerAdmin webmaster@lubuto.com
DocumentRoot /var/www/html/virtualhost02
ServerName www.secondary.org
ServerAlias secondary.org *.secondary.org
ErrorLog logs/www.secondary.org-error_log
</Directory>
</VirtualHost>

i found a solution in this forum (see link below) but did not understand it. It refernced a directive that is not in the httpd.conf file (ServerPath ). Can someone explain how to fix this?
post suggesting solution

Last edited by rioguia; 10-26-2004 at 08:27 AM.
 
Old 10-26-2004, 08:26 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Change the DocumentRoot for the second virtual server to something like: /var/www/virtualhost02 since /var/www/html is the DocumentRoot for the first virtual server (which means that everything under that dir belongs to that server)
 
Old 10-26-2004, 08:50 AM   #3
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
thans but that didn't work

thanks but that didn't work.
i had an apache 2.047 server configured in just this way i described for over a year with no problem (i lost my configuration when my server crashed):.

regardless, i did the correction you suggested and get the same resutls.

for example, www.substantis.com and www.lubuto.org resolve to the primary.com directory.
 
Old 10-26-2004, 09:28 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Do you have a:
Code:
NameVirtualHost *:80
before any definition of virtual hosts?
 
Old 10-26-2004, 11:12 AM   #5
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
Can't <VirtualHost> without NameVirtualHost directive

Quote:
The NameVirtualHost directive is a required directive if you want to configure name-based virtual hosts.

Although addr can be hostname it is recommended that you always use an IP address, e.g.

NameVirtualHost 111.22.33.44
See: NameVirtualHost Directive

I'm not at my machine but I will be tonight and report back.
 
Old 10-26-2004, 09:07 PM   #6
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
missing Listen 80 and NaveVirtualHost *:80

here are the entries i was missing:

# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

Source: VirtualHost Examples
 
  


Reply



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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Host Overlap wittygal1 Linux - Newbie 1 08-02-2005 09:31 PM
gaim docklet in gnome overlap. araldit Linux - Software 0 01-24-2005 10:32 AM
lagging music(and no overlap) Sticktendo Linux - Newbie 2 01-04-2005 04:03 PM
partition woes - logicals overlap?!? acidstars Linux - Newbie 3 06-23-2004 05:42 PM
Hardrive overlap gopherCG Linux - Hardware 3 04-28-2002 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration