Website: http://cleverkite.com
Whois
Datacenter Location
Spec and Features
{ 0 comments }
Few weeks ago i rent one box VPS to test resource usage from three different webservers without any tweaks, it is just basic installation with PHP and MySQL. This three webservers are Apache, Nginx, and LiteSpeed Free Edition. I’m using wordpress basic installation (without any plugins) plus one 404KB image and load it with 50 visitors maximum simultaneously. This VPS has 256MB memory (512MB burst) and using CentOS 5.5 32bit with OpenVZ virtualization. Allright here are the results.
Apache
{ 0 comments }
This is the improvement of my previous Nginx version 0.8.53 with PHP 5.3.5 installation, and also this time i’m not using php-fpm to run fastcgi, i’m using php-cli command to run fastcgi, and the result is memory usage decreased about 50MB. So let’s get it on!
VPS: CentOS 5.5 32bit with 256MB RAM XEN
Add EPEL and REMI repository, also update YUM (we will use REMI reposity for PHP 5.3.5)
EPEL 32bit
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
EPEL 64bit
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
REMI
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm yum -y update
Install Nginx
yum -y install GeoIP GeoIP-devel GeoIP-data perl libperl
32bit
rpm -Uvh http://centos.alt.ru/repository/centos/5/i386/nginx-stable-0.8.54-1.el5.i386.rpm
64bit
rpm -Uvh http://centos.alt.ru/repository/centos/5/x86_64/nginx-stable-0.8.54-1.el5.x86_64.rpm
start Nginx and add to init
/etc/init.d/nginx start chkconfig --add nginx chkconfig nginx on
Configure Nginx virtual host
As usual i prefer separate Nginx vhost for each domain so it will be easier to manage, and “/home” directory for domain root so it will ease you to synchronize domain root with ftp user root
create your domain root
mkdir -p /home/domain/public_html mkdir -p /home/domain/logs
create two directory for domain vhost
mkdir /etc/nginx/sites-available mkdir /etc/nginx/sites-enabled
edit Nginx configuration (more…)
{ 0 comments }
In my previous note i’m installing PHP 5.3.5 with XCache PHP opcode cacher, if you prefer to use eAccelerator for your PHP cacher, here is the guide note.
Download and install eAccelerator package
wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.zip unzip eaccelerator-0.9.6.1.zip cd eaccelerator-0.9.6.1 phpize ./configure make make install
add eAccelerator extension and settings to php.ini
nano /usr/local/lib/php.ini
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
those setting above is default, for more information you can visit: eAccelerator Settings
create eAccelerator tmp folder
mkdir /tmp/eaccelerator chmod 777 /tmp/eaccelerator
Check your PHP Version with eAccelerator installed
php -v
PHP 5.3.5 (cli) (built: Feb 11 2011 02:10:37)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
Reference: eAccelerator Wiki
{ 0 comments }
New update: Nginx 0.8.54 + PHP 5.3.5 has been posted
I’m doing this on my CentOS 5.5 64bit with 256MB RAM OpenVZ VPS, another / my way to install Nginx with the appropriate modul for hosting WordPress site or blog. Nginx version is still 0.8.53 because i’m using Epel Repository.
Download Epel Repository
32bit
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
64bit
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
Update YUM
yum update
Install Nginx and required packages
yum install -y nginx patch libtool libmcrypt-devel libxml2-devel make automake gcc gcc-c++ sudo flex bison wget zlib-devel openssl-devel pcre pcre-devel pcre-devel gd-devel bzip2* libc-client-devel.x86_64
Start Nginx
chkconfig --add nginx chkconfig nginx on /etc/init.d/nginx start
Optional: Before starting Nginx, you have to stop and / or remove httpd
service httpd stop yum remove -y httpd
Install MySQL
yum install -y mysql mysql-server mysql-devel service mysqld start
{ 0 comments }
Just like the title said, this isn’t tutorial to use Nginx as proxy for Apache with cPanel control panel. This is just story about me using Nginx for that kind of purpose in my cPanel VPS. Okay so here’s the story.
About a week ago, i called my friend because i need him to create me an ftp and ssh account in our community VPS so i can do some test for this VPS provider. At the time i checked the site load, it is amazing that our community forum took less than 2 seconds on average for 50 user visit simultaneously. I’m curious about that so i checked the VPS configuration, and it turns out that the VPS using Nginx as webserver. Wow, i want to try Nginx too for my website, so i’m googling and find the tutorial to install Nginx. I was able to install Nginx and use Webmin for administation panel. It is running well and smooth in my VPS, but there is a problem with .htaccess. Nginx doesn’t support .htaccess like Apache or Litespeed, so i’m googling again to find the way to resolve this problem. Then i found how to convert .htaccess configuration for Nginx, and yes my single website which using WordPress is working.
Until that moment there is no problem, but another problem arise when i want to share my VPS to my community member and my friend. I know that some of them can resolve the problem with .htaccess, but there are another person who are only like what is it called end user. They have no experience to mod the .htaccess to Nginx mod_rewrite configuration. It’s been a few days that i was thinking how to resolve this problem. Then i’m chat with my friend in messenger, it’s just a usual talk, and in the middle of our chat he told me that there are now lots of web hosting provider combine Nginx and Apache in their web hosting. It runs two webserver in one server and can take advantage from both. Again i’m googling (it’s the free way to gain knowledge) to find the true story about this, and there are lots of people saying that Nginx as proxy will serve static file like html, images, css, etc. while Apache keep doing work for dynamic files and we can keep using .htaccess as most of script is need to work with it.
It sounds interesting, i can keep my VPS load low and keep share it with my community member. I have tried create new account in cPanel, install WordPress, check the .htaccess configuration, all works perfectly. Nginx’s vhost configuration is automatically creating new vhost each time i created new account. You only have to create new vhost configuration manually if you transfer the account from another cPanel account.
End of my story, i’m not going to write about the tutorial here, once again i’m telling you it is not the tutorial and you just googling it, thank you.
{ 0 comments }
{ 0 comments }
{ 0 comments }