2

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>
Phunt
  • 45
  • 1
  • 2
  • 6

2 Answers2

2

Yes, you can use Options Indexes MultiViews

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

Hmm, the wrong answer is accepted. And the correct answer is edited?

Maybe it's only strange to me, since I have Vietnamese culture ;-)

0

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.

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84