Solved

configure apache to include mounted folder in linux

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

746 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

11 Experts available now in Live!

Get 1:1 Help Now