Solved

configure apache to include mounted folder in linux

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

776 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