Posts Under Category: Nginx

nginx-admin
Nginx Admin is a free plugin for cPanel to add nginx support. Its very easy to install and get it working. It will hardly take 10-15 minutes to get things done. read more

cpanel-nginx
cPanel is most popular hosting control panel. By default cPanel do not support Nginx and uses Apache. Nginx is supposed to be much faster and lighter compared to Apache. So, how can we add Nginx on a cPanel server.
read more

Optimize Nginx
Nginx is small, fast and light weight alternative of Apache. But Nginx also needs few tweaking to optimize it. In this tutorial we are going to learn three tweaks to optimize a Nginx server and improve its performance.
read more

nginx free hosting control panel
Nginx is a fast and low memory usage web / HTTP server software. Nginx is considered to be faster compared to Apache web server. There are lots of paid and free hosting control panel like cPanel available for Apache server, but there are only few Nginx supported hosting control. read more

In this tutorial, I will explain how to install Nginx on a CentOS server / VPS. This is very easy and will not take more than 5 minutes.

Before starting installation of Nginx, make sure you have installed PHP and MySQL
How to install PHP
How to install MySQL

Login to your server via SSH and as root.

Step 1:

If you have already installed Apache and is running, stop Apache.

service httpd stop

Step 2:

Create nginx repo file.

touch /etc/yum.repos.d/nginx.repo

Step 3

Edit nginx repo file.

nano /etc/yum.repos.d/nginx.repo

And add following code. Save the file.

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

Step 4

Install Nginx

yum install nginx

Step 5

Start Nginx

service nginx start

Step 6

Make nginx auto start on server reboot.

sudo chkconfig nginx on

Done!!

Default Web Directory

This is the default folder / directory of Nginx server. You should upload your website files in this directory.

/usr/share/nginx/html

read more