Domain Name Yahoo

Easy Help Troubleshoot Your Linux Box



  

Easy Help Troubleshoot Your Linux Box


Sharing code for webserver using NFS

  

Separating machines between WebServer and the code server is kind of easy.
Basic knowledges you have to know is about httpd.conf, networkfilesystem, fstab, and user-group id

NetworkFileSystem is the one we will use to share the directory from the code server.
First : SeeĀ  your httpd.conf filesĀ  for each VirtualHost directives, you will find DocumentRoot for each VirtualHosts.
These VirtualHosts are all the domains/hosts absolute path on unix style.

example :

<VirtualHost *:80>
ServerAdmin admin@domainnameyahoo.info
DocumentRoot /var/www/html/domannameyahoo.info
ServerName domainnameyahoo.info
ServerAlias www.domainnameyahoo.info
ErrorLog /var/log/httpd/domainnameyahoo.info-error_log
CustomLog /var/log/httpd/domainnameyahoo.info-access_log common
DirectoryIndex default.php index.php index.html
</VirtualHost>

Next, make sure you have php/html code in your code server.
Then start to mount the code server as follow :

# mount -t nfs -o rw 192.168.1.10:/var/www/html/domainnameyahoo.info /var/www/html/domainnameyahoo.info

note : 192.168.1.10 is your code_server ip address


June 18th, 2009 Posted by admin | Apache, CentOS, Ubuntu | no comments

No Comments »

No comments yet.

Leave a comment