Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I am running Ubuntu, and have installed Apache. When I input my IP address on a web browser, I see the following message:

File browser:

main.exe is a file which exists in /var/www/ in my computer, and also, the html index.html also exists in the folder:


File Browser
<a href = "/"></a>

Now I want to let others download my file in /home/user/, except moving to /var/www, how can I let others access that file?

If using Apache is inconvenient, any other ideas that implementing it?

share|improve this question

migrated from Feb 26 '12 at 10:50

This question came from our site for professional programmers interested in conceptual questions about software development.

1 Answer 1

up vote 1 down vote accepted

You can create a symlink (short for symbolic link) in the /var/www/ to point to the file in /home/user/ The command would be:

cd /var/www/
sudo ln -s /home/user/

The format of the comand is


The -s option is required to create a symbolic link.

It will create the symlink /var/www/ that will point to /home/user/

You could do that to folders too. That's what I do when I need to share a file.

share|improve this answer
thx, its a good idea –  MarkZar Mar 1 '12 at 10:50

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.