I'm having trouble getting multiple sites working with Apache on Ubuntu 10.04. I have two sites I want to serve from the same VPS, psychedeli.ca and mahoganytales.com. The problem is, both domains are pointing to the site for psychedeli.ca instead of their own respective sites.

psychedeli.ca is apache2's default domain because it's the vhost that's loaded first. I know for a fact that NameVirtualHost *:80 is being set in ports.conf, which is included into apache2.conf about 10 lines before these vhost configs in sites-enabled/ are. All of the permissions check out for all directories involved.

My apache.conf is standard from Ubuntu 10.04.

Here's my ports.conf: https://gist.github.com/911799

And here are my vhosts:


<VirtualHost *:80>
    DocumentRoot /var/apps/psycho/public
    ServerName psychedeli.ca


<VirtualHost *:80>
    DocumentRoot /var/apps/mahogany/public
    ServerName mahoganytales.com

Dumb question, but did you restart the apache service? Not sure how to do that on Ubuntu (CentOs: services httpd restart), but rebooting the server will work too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.