httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [users@httpd] Alias-ed directory appears on multiple virtual hosts
Date Tue, 07 Dec 2010 18:08:51 GMT

I've switched to a new debian server with apache 2.2.9 and installed the 
tool via a debian package.
This copies the php sources outside of /var/www and sets an 'alias ..'
directive in /etc/apache2/conf.d/

Now what happens to my surprise is that /phppgadmin is accessible via
all my virtual hosts, not just the one (base host) where it is

I also decided to serve the tool only via https, so I moved the
directive to the SSL part of my config.
Simplified, my vhost.conf (included by httpd.conf) looks like this:


         ServerAlias *
         DocumentRoot /var/www/
         ServerAlias *
         DocumentRoot /var/www/two/

## SSL ##
         ServerAlias *
         DocumentRoot /var/www/
# pgAdmin
Alias /phppgadmin /usr/share/phppgadmin/
<Directory /usr/share/phppgadmin/>
         DirectoryIndex index.php
         Options +FollowSymLinks

# end vhost.conf

So, what works as designed:

What works not and should not work - i.e. throws a 404 error:

What works and should _not_ work:

It seems that the Alias directive is applied to _all_ hosts, not just
the one inside the <VirtualHost .. /> block. From the apache docs:
I read the "context: Virtual host" means it is only effective in the
respective host, but maybe I misunderstood this?
Any hints how to restrict /phppgadmin on the first domain?

/ Bernd

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message