httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenzo Milesi <>
Subject [users@httpd] Restricting config to a single virtualhost
Date Fri, 24 Dec 2010 08:12:10 GMT

I'm using Apache2 on Ubuntu Server.
I've configured three virtual hosts, two on port 80 and one on port 443.
I've also several web apps, some directly placed in /var/www, some others installed system
wide, which are configured by files placed in conf.d/.
Here comes my problem, because this makes those apps available to every virtualhost, while
I'd like to restrict them to run only on a selected website, that is the SSL one!

This is a part of my sites-available/default-ssl:
<IfModule mod_ssl.c>
<VirtualHost *:443>
        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

And this is, for example, conf.d/gitweb installed by debian package:
Alias /gitweb /usr/share/gitweb
<Directory /usr/share/gitweb>
  Options FollowSymLinks +ExecCGI
  AddHandler cgi-script .cgi

Debian includes conf.d/* before sites-enabled/*, this means gitweb is loaded before default-ssl.
Reverting this behavior is not a big deal, but how do I make gitweb available only to the
SSL website?
I know I could place gitweb content into default-ssl, but I'd rather keep them separated,
if possible.

Lorenzo Milesi -

YetOpen S.r.l. -
Via Carlo Torri Tarelli 19 - 23900 Lecco - ITALY -
Tel 0341 220 205 - Fax 178 6070 222

GPG/PGP Key-Id: 0xE704E230 -

-------- D.Lgs. 196/2003 --------

Si avverte che tutte le informazioni contenute in questo messaggio sono
riservate ed a uso esclusivo del destinatario. Nel caso in cui questo
messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo
senza copiarlo, a non inoltrarlo a terzi e ad avvertirci non appena

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