Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to gethostbyname("www")

Status
Not open for further replies.

Mellegem

Technical User
Apr 3, 2003
49
ZA
Hi there, I'm trying to set up 2 virtual hosts by name and apache won't start up.
I am using a Debian server.
My zone and apache.conf files look perfect according to my books and I can ping my virtual domains. Below are some excerts from important files.
Please help...

httpd.conf

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them.
# Please see the documentation at <URL:# for further details before you try to setup virtual hosts.
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# If you want to use name-based virtual hosts you need to define at
# least one IP address (and port number) for them.
#
#NameVirtualHost 12.34.56.78:80
NameVirtualHost 192.168.0.2

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
#

<VirtualHost 192.168.0.2>
DocumentRoot &quot;/var/ ServerName </VirtualHost>

#<VirtualHost 192.168.0.2>
# DocumentRoot &quot;/var/# ServerName #</VirtualHost>

#<VirtualHost _default_:*>
#</VirtualHost>


db.del.com
 
If you only have 1 NIC in that machine, try:

NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
#

<VirtualHost *:80>
DocumentRoot /var/ ;quotes removed
ServerName </VirtualHost>

# hash's removed from this vhost
<VirtualHost *:80>
DocumentRoot /var/ ;quotes removed
ServerName </VirtualHost>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top