Solved

Linux CentOS 6 partition problem

Posted on 2014-01-16
4
483 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 150 total points
Comment Utility
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
Comment Utility
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 150 total points
Comment Utility
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
Comment Utility
Thank you.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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 …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

744 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

15 Experts available now in Live!

Get 1:1 Help Now