How to create a downloadable public link for files on server [closed] How to create a downloadable public link for files on server [closed] linux linux

How to create a downloadable public link for files on server [closed]


Install Apache2

sudo apt-get install apache2

Place your into file the /var/www/ directory (might need root privileges for this)

sudo cp yourfile /var/www/yourfile

Access the file with the following link:

http://your-ip-address/yourfile

If your running under a router or firewall, you might have to open port 80 and forward it to your pc.


Lets assume your filename is foobar.iso.

You could just place it in your web root, and give the link example.com/foobar.iso to people. This will download the file.

Optionally, place it in a directory downloads. The download link will then be example.com/downloads/foobar.iso.