Ubuntu – Apache Alias Isn’t In Directory Listing

aliasapache-2.2Ubuntu

I've got a site running on my home server that's just a front end for me to grab files remotely. There's no pages, just a directory listing (Options Indexes…). I wanted to add a link to a directory outside of the webroot so I made an alias. After a minute of dealing with permissions, I can now navigate to the directory by typing the URL into the browser, but the directory isn't listed in the root index. Is there a way to do this without creating a symlink in the root?

Server: Ubuntu 11.04, Apache 2.2.19

Relevant vhost:

<VirtualHost *:80>
  ServerName some.url.net

  DocumentRoot "/var/www/some.url.net"
  <Directory /var/www/some.url.net>
    Options Indexes FollowSymLinks
    AllowOverride None
    Order Allow,Deny
    Allow From All

    AuthType Basic
    AuthName "TPS Reports"
    AuthUserFile /usr/local/apache2/passwd/some.url.net
    Require user user1 user2
  </Directory>

  Alias /some_alias "/media/usb_drive/extra files"
  <Directory "/media/usb_drive/extra files">
    Options Indexes FollowSymLinks
    Order Allow,Deny
    Allow From All
  </Directory>
</VirtualHost>

Best Answer

No. Aliases never show up as part of the filesystem; they only exist in the web server, and mod_autoindex only deals with the filesystem.

Related Topic