# Apache 22 vhost config not obeying rules.



## Kingedgar (Aug 3, 2012)

First off I have a few Alias/Directory directives in my httpd.conf file for things such as phpmyadmin. I also have enabled the vhosts config and in that I have properly configured a separate document root for the site in the vhost container.

Even with the virtualhost configured and working, I am still able to access the /phpmyadmin/ alias within the scope of the virtualhost config.

Say http://www.example2.com is in the vhost config. I can still get to http://www.example2.com/phpmyadmin/ even though I should not be able to. I thought that being in a virtual host was like "jailing" a site? Am I wrong? Is this Apache's default behavior? I can post my virtualhost config section if it is needed...


Thanks!!!


----------



## Kingedgar (Aug 3, 2012)

In my Main Server section I have an Alias for phpvirtualbox. I also have a name based virtual host setup for a completely different domain we will call http://www.example2.com. In the v-host config section there is a completely different document root but yet I can STILL get to the Alias to phpvirtualbox in my Main server config. Is this apache's default behavior? How do I get apache to only serve what is in the document root of the v-host config section and not pickup the Alias from the Main server config?


----------



## SirDice (Aug 3, 2012)

Please don't double post.


----------



## Kingedgar (Aug 3, 2012)

My apologies, I waited about 10 minutes and the first post did not show up. One can be deleted as they are the same question.

Again my apologies...


----------

