LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2004, 03:23 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
apache 2 virual hosts


Hi i want my apache serves 2 web sites... When i run the server this error message appears

[warn] VirtualHost palaios.gr:0 overlaps with VirtualHost evridikifans.gr:0, the first has precedence, perhaps you need a NameVirtualHost directive

and here is my configuration file
<VirtualHost palaios.gr>
ServerName palaios.gr
ServerAdmin alex@palaios.gr
DocumentRoot "/www/docs/palaios.gr"
</VirtualHost>

<VirtualHost evridikifans.gr>
ServerName evridikifans.gr
ServerAdmin alex@palaios.gr
DocumentRoot "/www/docs/evridikifans.gr"
</VirtualHost>


the palaios and evridikifans.gr has the same ip as denoted in the /etc/hosts file....
What i must do to solve it... and why this message appears?
Have a nice day
 
Old 05-06-2004, 03:26 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Try setting both virtual hosts with this in each setting instead of naming them by the site name, etc:

<VirtualHost *>
ServerName palaios.gr
ServerAdmin alex@palaios.gr
DocumentRoot "/www/docs/palaios.gr"
</VirtualHost>

<VirtualHost *>
ServerName evridikifans.gr
ServerAdmin alex@palaios.gr
DocumentRoot "/www/docs/evridikifans.gr"
</VirtualHost>
 
Old 05-06-2004, 03:27 PM   #3
Matt Collier
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 80

Rep: Reputation: 15
as the error msg says, you need a NameVirtualHost directive

NameVirtualHost 1.2.3.4

<VirtualHost 1.2.3.4>
ServerName palaios.gr
ServerAdmin alex@palaios.gr
DocumentRoot "/www/docs/palaios.gr"
</VirtualHost>

<VirtualHost 1.2.3.4>
ServerName evridikifans.gr
ServerAdmin alex@palaios.gr
DocumentRoot "/www/docs/evridikifans.gr"
</VirtualHost>
 
Old 05-07-2004, 12:23 AM   #4
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
what this directive provides?
 
Old 05-07-2004, 12:37 AM   #5
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
noooo

Starting httpd: [Fri May 07 08:39:38 2004] [warn] VirtualHost 1.2.3.4:0 overlaps with VirtualHost 1.2.3.4:0, the first has precedence, perhaps you need a NameVirtualHost directive
 
Old 05-07-2004, 01:10 PM   #6
Matt Collier
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 80

Rep: Reputation: 15
it's the IP to map virtual hosts to, not literally 1.2.3.4 (sorry to have missed that out)

*, or *:80 will often work, which will listen to every ip, or every ip on port 80

so, replace 1.2.3.4 with your ip address, and try starting apache
 
Old 05-18-2004, 01:05 PM   #7
LuggerHouse
Member
 
Registered: May 2004
Location: Montreal,QC,Canada
Distribution: Fedora Core 7
Posts: 210

Rep: Reputation: 30
I would recommand <VirtualHost *> especialy if you do not have static IP :-)
 
  


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
apache hosts Henster Linux - Software 1 07-24-2005 05:24 AM
apache virtual hosts Red Squirrel Linux - Software 4 06-20-2004 09:05 AM
apache 2 virual hosts alaios Linux - Networking 4 06-03-2004 06:48 PM
Apache virtual hosts Mil0 Linux - Software 5 06-01-2003 11:58 PM
apache virtual hosts jonfa Linux - General 1 06-04-2002 01:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:45 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