Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Linux CentOS 6 partition problem

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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 …
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…
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

861 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