Solved

configure apache to include mounted folder in linux

Posted on 2009-06-29
2
426 Views
Last Modified: 2013-12-15
I have a linux box which is running apache / php. When I browse the machine http://123.123.123.123, the apache root folder is the /var/www/html folder. That works fine.

I have a bunch of files in the "/mnt/sdb1" folder which is a partition on another hard drive in the computer. I'd like to expose this folder on the web so I can go http://123.123.123.123/record/aaaa.zip in order to download /mnt/sdb1/aaaa.zip from my linux box.

How do I configure apache to do that?
0
Comment
Question by:Frosty555
2 Comments
 
LVL 4

Accepted Solution

by:
tokyoahead earned 500 total points
ID: 24742846
you have to setup an alias in your httpd.conf

Alias /record/ "/mnt/sdb1/"

this will use the /sdb1/ for all hits that are made to /record/

be aware that if you later create a  /var/www/html/record/ this folder will not be accessible since /mnt/sdb1 will be used

dont forget to restart your server after changing the config.
0
 
LVL 17

Expert Comment

by:jasonsbytes
ID: 24745011

ln -s /var/www/html/record/ /mnt/sdb1/

Open in new window

0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now