Solved

Linux CentOS 6 partition problem

Posted on 2014-01-16
4
484 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
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 150 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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 count occurrences of each item in an array.
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.

911 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

18 Experts available now in Live!

Get 1:1 Help Now