Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

001-psycho

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

002-mahogany

<VirtualHost *:80>
    DocumentRoot /var/apps/mahogany/public
    ServerName mahoganytales.com
</VirtualHost>
share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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