Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Dec 19, 2011 12:39 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
I have successfully set up two virtual servers on my Debian Squeeze Linode. My browser sees both sites, and both are operating normally. But when I restart Apache, I get this:

root@everything: /etc/init.d/apache2 reload
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[warn] NameVirtualHost *:80 has no VirtualHosts

Can anyone tell me why I get this warning?

Here is one of the two files, bookgenius.org, that's in the sites-available directory:

<VirtualHost bookgenius.org:80>

#<VirtualHost 72.14.179.185:80>

# Admin email, Server Name (domain name) and any aliases
ServerAdmin morgan@bookgenius.org
ServerName bookgenius.org
ServerAlias www.bookgenius.org www.bookgenius.com bookgenius.com


# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /var/www/bookgenius.org/html/

# CGI Directory
ScriptAlias /cgi-bin/ /var/www/bookgenius.org/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
AddHandler cgi-script .pl
</Location>

# Custom log file locations
LogLevel warn
ErrorLog /var/www/bookgenius.org/logs/error.log
CustomLog /var/www/bookgenius.org/logs/access.log combined

</VirtualHost>

Thanks,

- Chris


Top
   
 Post subject:
PostPosted: Mon Dec 19, 2011 6:33 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Somewhere in your config, you have "NameVirtualHost *:80" (a commonly sensible default), but you don't have "<VirtualHost *:80>" anywhere. This is usually human error, but won't directly break things. Every distinct <VirtualHost $BLAH> should (must?) have a corresponding NameVirtualHost $BLAH, and likewise, every NameVirtualHost $BLAH should have at least one <VirtualHost $BLAH>.

("apache2ctl -S" could explain what it is trying to do better than I can.)

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Mon Dec 19, 2011 7:51 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
Many thanks -- I'll check my config!


Top
   
 Post subject:
PostPosted: Thu Dec 22, 2011 5:10 am 
Offline
Newbie

Joined: Sun Dec 18, 2011 5:49 am
Posts: 2
cpmorgan, if you use vim as your editor, you can open the apache config and type ? (question mark) then \*:80 after Press enter.

Your command should look like
Code:
?\*:80


This should make your job easier :P


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group