Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If you have an Apache running at, and you have a number of virtual hosts as well (,, you can access directories on the main branch while you are on the virtual hosts.

For instance, let's say I install phpmyadmin. I can access it, after including the apache.conf file, by going to However, I can also access it by going to or I assume this has to do with the line Alias /phpmyadmin /usr/share/phpmyadmin (in phpmyadmin's apache.conf), and that it applies to all virtual hosts on Apache.

Is there a way to make it just apply to the default site, and none of the subdomains? Can I make it so won't find phpmyadmin?

share|improve this question
Where did you configure that Alias line? – Shane Madden Sep 20 '13 at 17:06
It is in the generated phpmyadmin apache.conf file (which is included in apache's apache2.conf). – MirroredFate Sep 20 '13 at 17:10
up vote 2 down vote accepted

Move that Alias directive (and possibly other parts of the generated config?) or the Include that's bringing in the phpmyadmin config into the specific <VirtualHost> blocks that you want it to apply to - that will cause them to apply only to those specific virtual hosts instead of the entire server.

share|improve this answer
Should I just move the Include of the phpmyadmin apache.conf from apache's apache2.conf to the specific virtual host? – MirroredFate Sep 20 '13 at 17:15
@MirroredFate Yup, that will work too! – Shane Madden Sep 20 '13 at 17:15
Tried it, it didn't D: I tried moving the include directive to a couple different virtual host configuration files, but it is still available no matter which subdomain I use. Will keep looking for something out of place. – MirroredFate Sep 20 '13 at 17:23
@MirroredFate That's.. strange. Does it go away if you turn off the Include in the one virtual host? – Shane Madden Sep 20 '13 at 17:36
Yes, it goes away completely. It can no longer be found by Apache anywhere. – MirroredFate Sep 20 '13 at 17:43

remove the alias from the conf.

ln -s /usr/share/phpmyadmin /$vHostDocRoot/phpmyadmin

that is the easiest way.... other wise you can try moving the Alias directive into the virtual host configuration.

share|improve this answer

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.