Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Feb 02, 2009 2:44 pm 
Offline
Senior Newbie

Joined: Mon Feb 02, 2009 2:34 pm
Posts: 10
I had this problem before and somehow managed to fix it. I wish I remembered how!

I have copied apache2.conf and all my sites-available files from another debian etch box to a fresh debian etch box on my linode.

apache starts fine, there are no errors, and all my domains go to default site :/. What?!

Code:
# domain: default.com
# public: /home/patrick/public_html/default/

<VirtualHost *>

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

# Index file and Document Root (where the public files are located
DirectoryIndex index.html index.php
DocumentRoot /home/patrick/public_html/default/public

<Directory "/home/patrick/public_html/default/public">
        AllowOverride All
</Directory>

# Custom log file locations
ErrorLog  /home/patrick/public_html/default/logs/error.log
CustomLog /home/patrick/public_html/default/logs/access.log combined

</VirtualHost>


All the other vhosts are much the same except for having the domain name/directory changed. This worked on the other server with the same apache2.conf, so what gives?! I don't doubt it is something very simple!

The old server was a slicehost box, if that is any sort of hint to a solution?

Thank you!


Top
   
 Post subject:
PostPosted: Mon Feb 02, 2009 2:47 pm 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
Do you have a NameVirtualHost somewhere in your configuration?

-James


Top
   
 Post subject:
PostPosted: Mon Feb 02, 2009 2:57 pm 
Offline
Senior Newbie

Joined: Fri Aug 29, 2008 10:41 pm
Posts: 6
Location: San Antonio, TX
In addition to copying the contents of sites-available, did you run a2ensite on those sites (or copy the links)?


Top
   
 Post subject:
PostPosted: Tue Feb 03, 2009 12:39 am 
Offline
Senior Newbie

Joined: Mon Feb 02, 2009 2:34 pm
Posts: 10
As I expected, it was just me being a moron.

I had a file in /etc/apache2/conf.d with just NameVirtualHost * in it which I forgot to copy over.

For some reason if I put that line in apache2.conf it throws an error, but it doesn't mind it in a separate file like that. Who knows.


Top
   
 Post subject:
PostPosted: Tue Feb 17, 2009 12:21 am 
Offline
Senior Newbie

Joined: Mon Feb 02, 2009 2:34 pm
Posts: 10
I have updated to Debian Lenny.

When apache2 starts, it now says:

[warn] NameVirtualHost *:80 has no VirtualHosts

Which is odd, as I have not changed anything in the config files. The server works though, every site comes up as it should.

The end of my apache2.conf:
Code:
# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/


In /etc/apache2/conf.d/virtual:
Code:
#
#  We're running multiple virtual hosts.
#
NameVirtualHost *


All of my sites vhost files look much like the example in the original post.


Top
   
 Post subject:
PostPosted: Tue Feb 17, 2009 2:24 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
Did you happen across the section titled "Upgrading Apache2" in the release notes?

http://www.debian.org/releases/lenny/i3 ... ml#apache2


Top
   
 Post subject:
PostPosted: Tue Feb 17, 2009 2:49 am 
Offline
Senior Newbie

Joined: Mon Feb 02, 2009 2:34 pm
Posts: 10
I had changed all my sites under site-available to *:80. I just now changed the line in /etc/apache2/conf.d/virtualhosts to read NameVirtualHost *:80.

I also had let the update overwrite my apache2 config file. The only change I had made to it was adding ServerName.

Anyway, error is still there. I wish it would output a line number and exactly which config file it is mad at.

In other news, I managed to get SSL working on a single virtual host :o.


Top
   
 Post subject:
PostPosted: Fri Feb 27, 2009 1:58 pm 
Offline
Senior Newbie

Joined: Fri Feb 20, 2009 11:56 am
Posts: 13
patrick wrote:
I had changed all my sites under site-available to *:80. I just now changed the line in /etc/apache2/conf.d/virtualhosts to read NameVirtualHost *:80.

Don't feel bad, same thing happened to me when I switched over from Slicehost. :-) I figured it out pretty quickly, but it was still a bit of a pain.


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


Who is online

Users browsing this forum: No registered users and 2 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