Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have setup subdomains using Apache before and have never really ran into any big problems. But with this (I believe Centos) server that is one of my clients, I'm not understanding what I'm doing wrong. Here is the .conf that apache is loading:

Listen 80
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /u1/
    RailsEnv production

<VirtualHost *:80>
    DocumentRoot /u1/

When I access either the primary or subdomain addresses, they both point to the primary content. Any thoughts?


Yes I did a configtest and graceful after making the changes.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Have you made sure to reload Apache after making the change?

Edit: Sometimes graceful doesn't perform properly, do an apachectl restart.

share|improve this answer
apachectl restart did the trick. Wonder why graceful doesn't always work. – Jake Wilson Dec 11 '09 at 19:48
graceful sends SIGUSR1 to the apache processes, meaning they don't exit until current connections are closed. I believe if there are hung connections or ongoing ones it means that it could be some time until your new config takes effect. I could be wrong about this, but that was my understanding. – brent Dec 11 '09 at 19:51
Thanks a bunch! – Jake Wilson Dec 11 '09 at 20:01

Your Answer


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.