Solved

configure apache to include mounted folder in linux

Posted on 2009-06-29
2
430 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

809 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