Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux CentOS 6 partition problem

Posted on 2014-01-16
4
Medium Priority
?
511 Views
Last Modified: 2014-01-17
Hi,

I have a Linux CentOS virtual server where I have 20GB system drive (sda) and 20GB data drive (sdb). I installed Apache and MySQL as well as PHP.
What I want to do is to use data drive (sdb) for my website files and don't save them on system drive.
As I understand when I installed Apache it was installed on system drive which means all website files I use will go under Apache directory.
Is it possible to have Apache installed on system drive and website files on data drive (sdb) and Apache to see them?
I am not a big expert in Linux.

Please let me know if it is possible and how I can achieve it.

Thank you.
0
Comment
Question by:bqamarauli
4 Comments
 
LVL 58

Assisted Solution

by:Gary
Gary earned 450 total points
ID: 39787064
In httpd.conf or your virtual hosts file just change your DocumentRoot path to where it should be pointing

Then look for <Directory "/var/www"> and change the path there as well (the path maybe different)

If you don't know where httpd.conf is then do
locate httpd.conf
And it will show you the location.
0
 
LVL 44

Expert Comment

by:Darr247
ID: 39787099
Usually, the locate command won't find much until updatedb has been run (which requires root level access).
0
 
LVL 8

Accepted Solution

by:
Surrano earned 450 total points
ID: 39787858
I assume you mounted sdb, e.g. as /mnt/data

Stop Apache
Move the /var/www (or whatever) directory to /mnt/data:
mv /var/www /mnt/data/www
ln -s /mnt/data/www /var/www
Start Apache
0
 
LVL 1

Author Comment

by:bqamarauli
ID: 39787925
Thank you.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

916 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