Adding a hard drive

Don Erickson derick at shark.zeni.net
Thu Feb 21 04:16:25 CST 2002


In article <F206FhFryslSIZDzOvI0001b6be at hotmail.com> you write:
>
>I am in the process of hosting two domains and I am looking at these two 
>options
>
>Option 1:
>I am running RH 7.2 and I want to add a hard drive to it. Correct me if I'm 
>wrong, Once installed I run fdisk to set it up. This is the tricky part I 
>want to add mor space to my /var/www/html/ directory is it possible to 
>assign the partition as /var without losing any data and basically 
>increasing its size?  If not how can I configure apache to point to the new 
>partion without modifying apache too much?

There are dozens of ways to do this, but if you're hosting virtual domains
then you _will_ have to reconfigure apache somewhat.  Don't worry, it's
not so bad.

I'd say to install your hard drive, create a linux partition, create the
filesystem, mount it somewhere, copy your current /var/www/html contents
onto the new mounted partition, then remount your new partition as
/vaw/www/html. Stick an entry defining this into /etc/fstab and you should
be good when you reboot.

You will have to set up apache to serve for the newdomains anyway, and
document root will have to be pointed somewhere.  You could simply mount
your new drive under /newdrive and point newdomain.com's DocumentRoot at
/newdrive/firstdomain.root.  Then set seconddomain.com's DocumentRoot to
be /newdrive/seconddomain.root, for example.  This isn't what *I* would
do, but it would work.  I'd suggest that whatever you do, make sure that
it makes sense to *you*.

>Create a new RH 7.0 server system and have apache on the current system 
>setup with the new additionl domain but when the users goto www.myhost.com 
>it gets forwarded to the new internal system of 192.168.0.7. What is the 
>easiest means of doing this?

You can host both domains with one apache server on one machine.  This
would certainly be easiest.  Example entries for httpd.conf (apache 1.3):

NameVirtualHost server.ip.address.here

<VirtualHost domain1.com>
DocumentRoot /var/www/domain1
ServerName domain1.com
</VirtualHost>

<VirtualHost domain2.com>
DocumentRoot /var/www/domain2
ServerName domain2.com
Customlog /var/log/apache/domain2.log combined
</VirtualHost>

Just about any apache configuration directive can go into a VirtualHost
definition.  If you want to answer for www.domain1.com, you'll need an
additional set of <VirtualHost> entries for that.

-- 
Regards,

-Don




More information about the Kclug mailing list