LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-08-2006, 10:47 AM   #1
Maeltor
Member
 
Registered: Mar 2004
Location: Boise
Distribution: CentOS 5
Posts: 69

Rep: Reputation: 15
Apache Virtual Hosts (strange warning error when starting)


Hi everyone,

I have Apache 2.2.0 running on Suse 10.1 and I am having some weird problems when running "apache2ctl configtest"

Here is the error and command syntax:
Code:
web:/etc/apache2/vhosts.d # apache2ctl configtest
[Thu Jun 08 09:26:13 2006] [warn] NameVirtualHost 66.213.158.38:0 has no VirtualHosts
[Thu Jun 08 09:26:13 2006] [warn] NameVirtualHost 127.0.0.2:0 has no VirtualHosts
Syntax OK
The contents of vhosts.d:
Code:
web:/etc/apache2/vhosts.d # ls
vhost-ssl.template  vhost.template
The relevant section of httpd.conf:
Code:
### 'Main' server configuration #############################################
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
Include /etc/apache2/default-server.conf


# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf


### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf
NameVirtualHost 66.213.158.38
NameVirtualHost 127.0.0.2


# Note: instead of adding your own configuration here, consider
#       adding it in your own file (/etc/apache2/httpd.conf.local)
#       putting its name into APACHE_CONF_INCLUDE_FILES in
#       /etc/sysconfig/apache2 -- this will make system updates
#       easier :)
I'm not sure why i'm getting those two NameVirtualHost errors and I can't find matches anywhere for those addresses.
Any ideas?

-Josh
 
Old 06-08-2006, 12:25 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,925

Rep: Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327
According to your httpd.conf you have defined 2 vhost IP addresses:
Quote:
NameVirtualHost 66.213.158.38
NameVirtualHost 127.0.0.2
If you want a vhost to listen to any of those IPs you should create a vhost.conf file inside /etc/apache2/vhosts.d (that's where apache looks for vhosts config files due to the "Include /etc/apache2/vhosts.d/*.conf" line in httpd.conf). You can use vhost.template that already exists in that dir. You can also change the above 2 lines in one:
Code:
NameVirtualHost *
 
Old 06-08-2006, 02:48 PM   #3
Maeltor
Member
 
Registered: Mar 2004
Location: Boise
Distribution: CentOS 5
Posts: 69

Original Poster
Rep: Reputation: 15
Holy crap you must think i'm stupid.
I didn't even look at the config file close enough to realize those two were in there! Dammit all.

After spending hours working on apache2 with SSL and a self signed certificate (which I gave up on after a while for now anyways), I didn't even pay enough attention to the file to see the lines there.

Bah. Thanks for pointing it out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Apache Virtual Hosts (strange warning error when starting) Maeltor Linux - Kernel 1 06-08-2006 10:47 AM
apache virtual hosts Red Squirrel Linux - Software 4 06-20-2004 09:05 AM
Apache configuration error - virtual hosts jme Linux - Networking 8 03-15-2004 08:13 AM
Apache: Virtual hosts pk21 Linux - Software 15 10-08-2002 05:08 PM


All times are GMT -5. The time now is 01:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration