I am on Ubuntu 8.10, and generally share my content with ppl on LAN by creating soft links in Apache2 document root to the intended directory. So if I want to share my Videos directory I will

  1. CD /var/www

  2. ln -s ~/Videos/ video

    Then http:/// would list video directory to other users.

I am facing problem when I try the same thing for my external USB drive. The link gets created fine. From command line I can use the link just like other links, but apache does not show this directory on browser. I have checked the ownership and privileges. They are all fine.

1 Answer 1


Apache won't follow symbolic links unless you specify the FollowSymLinks option in the config file, but I really don't like symlinking out of the web space. Once you allow them, then you've got a potential security risk, if a link is created then it could serve out some sensitive information.

The right way to do this is to add an alias into the apache configuration. Create a file in /etc/apache2/conf.d with contents something like this

Alias /video/ "/home/aakash/Videos"
<Directory "/home/aakash/Videos/">
        Options Indexes MultiViews
        AllowOverride None

This will mean that http://example.com/video will be served from your Videos directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy