nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

VirtualHost Problems on Apache2

This is a discussion on VirtualHost Problems on Apache2 within the Linux software forums, part of the Linux Getting Started category; Hi everybody I'm getting this problem and I just can't understand how to get out of it. Can anybody help? ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 11-07-2006, 09:14 PM
Member
User
 
Join Date: Jun 2006
Location: Aveiro, Portugal
Posts: 37
Rep Power: 0
rcordeiro
Default VirtualHost Problems on Apache2

Hi everybody
I'm getting this problem and I just can't understand how to get out of it.
Can anybody help?
The xxx.mars.av.it.pt is a virtual host to /var/www/xxx.
If needed I could post my virtualhost configs.

root@artemis:/etc/apache2/sites-available# /etc/init.d/apache2 reload
* Reloading apache 2.0 configuration...
[Tue Nov 07 16:15:18 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name qqq.mars.av.it.pt --- ignoring!
[Tue Nov 07 16:15:18 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name xxx.mars.av.it.pt --- ignoring!
[Tue Nov 07 16:15:18 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name yyy.mars.av.it.pt --- ignoring!
[Tue Nov 07 16:15:18 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name zzz.mars.av.it.pt --- ignoring!
[ ok ]

Thanks
Rick
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-08-2006, 04:59 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 481
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

DNS is not working... run following command to see if you can read IP for domain zzz.mars.av.it.pt
Code:
nslookup zzz.mars.av.it.pt
Paste your config file. Also what is the output of command:
Code:
apache2  -t -D DUMP_VHOSTS
or
Code:
httpd  -t -D DUMP_VHOSTS
Reply With Quote
  #3 (permalink)  
Old 11-08-2006, 06:56 PM
Member
User
 
Join Date: Jun 2006
Location: Aveiro, Portugal
Posts: 37
Rep Power: 0
rcordeiro
Default

Here's the output of the command.

root@artemis:/etc/apache2# apache2 -t -D DUMP_VHOSTS
[Wed Nov 08 14:20:56 2006] [warn] VirtualHost xxx.mars.av.it.pt:80 overlaps with VirtualHost yyy.mars.av.it.pt:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Nov 08 14:20:56 2006] [warn] VirtualHost zzz.mars.av.it.pt:80 overlaps with VirtualHost xxx.mars.av.it.pt:80, the first has precedence, perhaps you need a NameVirtualHost directive
VirtualHost configuration:
127.0.0.1:80 mars.av.it.pt (/etc/apache2/sites-enabled/xxx:1)
193.136.92.209:80 mars.av.it.pt (/etc/apache2/sites-enabled/zzz:1)
wildcard NameVirtualHosts and _default_ servers:
*:* is a NameVirtualHost
default server localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
port * namevhost localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
Syntax OK


As of the config file, I have a config file for each virtual host. making a symbolic link from that config file in sites-available to sites-enabled. The virtual hosts (actual site file are located on /var/www/xxx, /var/www/yyy, etc..
Reply With Quote
  #4 (permalink)  
Old 11-08-2006, 10:30 PM
Member
User
 
Join Date: Jun 2006
Location: Aveiro, Portugal
Posts: 37
Rep Power: 0
rcordeiro
Default

problem solved. stupidity by my part. i had no dns server telling the client where to look for the sites.
just added the lines in my clients /etc/hosts file and voilá.
thanks all
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
php apache2 mysql pansarevai Web servers 1 03-05-2008 12:06 AM
How to start Apache2 automatically at boot satimis Web servers 2 02-03-2008 06:03 PM
PHPMyAdmin Problems JoeDively Coding in General 0 09-21-2007 09:30 PM
nfs problems marros Linux software 2 10-21-2006 01:30 AM
debian apache2 cgi-bin location Linux software 1 01-24-2006 06:44 PM


All times are GMT +5.5. The time now is 08:56 AM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36