Nginx web server
A few months back, I moved from Apache 2.2 to Nginx, a powerful lightweight webserver. Apache was taking up too RAM and slowing down at times.
I wanted to try Lighttpd, but decided against it because of its known memory leak problem. So I decided to give Nginx a try and I'm very happy at this transition. At the time of writing, the latest stable version of Nginx is 0.6.34.
UPDATE: Latest stable version is 1.
Nginx serves two purposes:
- It takes all the traffic load, particularly HTTP requests for static web content.
- It works as a load balancer and forwards dynamic requests to Apache, which may run on the same machine or another machine.
Installation of Nginx
Ubuntu or Debian
To install Nginx in Ubuntu or Debian, all you have to do is:
sudo aptitude update sudo aptitude install nginx
By default, Nginx installs in /etc/nginx
.
Installation from source
If you prefer to install Nginx from source, download it.
These commands should install Nginx in /usr/local/nginx
. You may change the configure script according to your preferences.
./configure make make install
RedHat or CentOS
If you use RedHat Linux, run this:
sudo yum install nginx
Next: Configuring Nginx
Related Posts
If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.