If you have an Apache running at somewhere.net
, and you have a number of virtual hosts as well (a.somewhere.net
, b.somewhere.net
), 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 somewhere.net/phpmyadmin
. However, I can also access it by going to a.somewhere.net/phpmyadmin
or b.somewhere.net/phpmyadmin
. 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 a.something.net/phpmyadmin
won't find phpmyadmin
?
Move that
Alias
directive (and possibly other parts of the generated config?) or theInclude
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.remove the alias from the conf.
that is the easiest way.... other wise you can try moving the
Alias
directive into the virtual host configuration.