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
Generally, people put together between the WebServer (httpd services) with php code.
For economic sakes , yes you may put it that way. No other choice.
But for easy maintenance and more security better you put WebServer and php code in separated machine even the Database server is also separated.
With this way you can create Web Server load balancing, or any backup Web Server.
Things you have to know is around linux file sharing ( i am going to use nfs as file sharing ) and some security on firewall to keep the code and database more secure.
This time, I put 1 little machine which will act as webserver.
I will tell you all the step by step about it.
June 4th, 2009
Posted by
admin |
Apache, CentOS, General, Ubuntu |
no comments
Yes date&time must be setup correctly, otherwise your cron job will blow your head off.
Before you change the date you must pay attention to your timezone.
Simply execute # timeconfig from the shell.
Timeconfig not working ? It must be installed first.
# yum install timeconfig
Here is some common use to set the date and time of your box
#date –set=”1 JUN 2009 12:28:00″
That will change your Date and time with the correct format and time zone.
June 1st, 2009
Posted by
admin |
CentOS, General, Ubuntu |
no comments