Remove an apache alias subdirectory

Posted by Hippyjim on Server Fault See other posts from Server Fault or by Hippyjim
Published on 2013-11-12T08:06:57Z Indexed on 2013/11/12 9:58 UTC
Read the original article Hit count: 233

Filed under:

I'm using Apache 2 on Ubuntu 12.04.

I added an alias for a subdirectory, to point to gitweb. I realised I should probably make it accessible only on https - so I removed the alias and restarted Apache.

I can still navigate to http://xyz/gitweb - even with no alias in any of my config files. How do I remove it?

EDIT

The config file looked like this before:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /home/administrator/webroot
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/administrator/webroot/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        Alias /gitweb/ /usr/share/gitweb/
        <Directory /usr/share/gitweb/>
                Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
                AllowOverride All
                order allow,deny
                Allow from all
                AddHandler cgi-script cgiDirectory
                Index gitweb.cgi
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

And this after:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /home/administrator/webroot
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/administrator/webroot/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

© Server Fault or respective owner

Related posts about apache2