LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-06-2011, 04:50 PM   #1
Program3r
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Post Access Hard Drive 2 From Apache, Alias?


I have 2 hard drives, and an Apache 2 server running on the first one. I would like to have access to files on hard drive 2 through Apache.

I tried everything I could think of and it's not working.

<IfModule mod_alias.c>
Alias /storage/ "/media/Geo Storage"

<Directory /media/Geo Storage>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

</IfModule>

Last edited by Program3r; 11-06-2011 at 06:04 PM.
 
Old 11-07-2011, 12:41 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi and welcome to LQ,

Quote:
I tried everything I could think of and it's not working.
You should give more details. What is your distro, apache logs etc.
In the meantime enclose path in the <Directory ...> directive in double quotes, as it contains a space. It should look like:
Code:
<Directory "/media/Geo Storage">
...
</Directory>
Regards
 
Old 11-07-2011, 01:38 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If the second drive is fixed and not removable, you should mount the filesystem on it where you want to access the files. Then it will be part of the filesystem. /media is for removable media.
 
Old 11-07-2011, 11:53 PM   #4
War3zWad|0
Member
 
Registered: Sep 2011
Location: Houston, TX
Distribution: openSuSE, Fedora, CentOS, Debian,, and others
Posts: 84

Rep: Reputation: Disabled
jschiwal is right on making sure that the drive has been mounted in the files system, if you did partition the drive during installation then you can point your Apache Directory Path statement to that location as bathory has stated.

To verify that your drive has been mounted you can use either df or du -h this will list out all mounted partitions. If the drive is not mounted then you will need to make sure that the file system has "discovered" the drive. You can accomplish this by looking to the following set of folders:

/dev/disk/

by-id
by-path
by-uuid
these are on most all linux distros but not always. I usually look to the by-id folder
this is a partial printout:
ls -al /dev/disk/by-id/
total 0
drwxr-xr-x 2 root root 540 2011-11-01 22:19 .
drwxr-xr-x 6 root root 120 2011-10-31 17:32 ..
lrwxrwxrwx 1 root root 9 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2 -> ../../sda
lrwxrwxrwx 1 root root 10 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2-part7 -> ../../sda7
lrwxrwxrwx 1 root root 10 2011-10-31 02:28 scsi-SATA_ST9320320AS_5SX5KNG2-part8 -> ../../sda8
lrwxrwxrwx 1 root root 9 2011-10-31 02:28 usb-Generic-_Multi-Card_20071114173400000-0:0 -> ../../sdb


This print out shows that I currently have only 1 hard drive installed to the machine I am on at this time. If I had 2 drives in this machine it would show sda & sdb(SATA) or hda & hdb(IDE/PATA) and so on.

If you see a second drive "sdb" that is not mounted then you can do the following to "temporarily" mount the drive:

(THIS IS ONLY AN EXMAPLE)
mkdir /media/hdd2
mount /dev/disk/by-id/scsi-SATA_ST9320320AS_5SX5KNG2-part8 /media/hdd2


To add this drive to your file system so that it is auto-mounted when the machine is booted then you will need to edit the fstab file in /etc

For better instructions and a good reference point please visit the following:

http://www.yolinux.com/TUTORIALS/Lin...HardDrive.html



And as always Google can be a good tool as well...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hardware crash,Repaired,New Install New Hard drive,how to access original Hard drive flatstan Linux - Hardware 7 07-21-2009 06:51 PM
How to access Access root(/) hard drive attached in Windows XP machine farrukhndm Linux - Software 2 07-29-2008 12:52 PM
two hard drive two distributions how can i access the other drive timbo1 Linux - Hardware 4 10-29-2007 06:35 AM
Apache - creating an alias to access a cd-rom or DVD. verlossen Linux - Software 2 11-23-2005 06:14 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration