Solved

Linux CentOS 6 partition problem

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

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 show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 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