Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 5 down vote accepted

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 will be served from your Videos directory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.