Posts Under Category: Tutorials

In this tutorial I will explain how to enable Drupal Clean URL support on a CentOS / RedHat Linux server.

Step 1

Before making any change in Apache configuration file, we will first make a backup of the Apache configuration file. Login as root to your server via SSH and run below commands: read more

By default Apache loads lots of modules which probably you do not need. If you want to optimize Apache on your VPS / Dedicated server, you should consider disabling un-needed Apache modules. Disabling un-necessary modules will save lots of memory and optimize server. In this tutorial I will explain how to disable un-needed Apache modules on a CentOS / RedHat server / VPS.
read more

In this tutorial I will explain how to install and setup LAMP on a RHEL/CentOS Linux 6.x server.
Before I start the tutorial, let’s know what is LAMP. LAMP stack is a group of open source software used to get web servers up and running. LAMP stands for Linux, Apache, MySQL, and PHP.
read more

For security reason it is recommended that you disable root SSH login to server. To SSH your server with root privileges you should create a new user and assign root privileges to this new user.

In this tutorial, we will assign root privileges to a new user ravi on a CentOS server.
read more

The main user / administrator of a Linux server is root. Here is how you can create a new user on your CentOS server / VPS.

Login to your server as root as run following command to create a new user named ravi.

/usr/sbin/adduser ravi

Now set password for new user ravi

passwd ravi

Screenshot

add-new-user

Done!!

read more

The current stable version of CentOS Linux OS is 6.5
If you want to upgrade your VPS / dedicated server to CentOS 6.5 from 6.4/6.3, follow below steps.
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

I was recently installing and configuring a new server. After installing CentOS I installed Apache. But server IP was not opening default Apache page. I was getting ping reply from my computer to server IP. So, I quickly figured out that Port 80 and Port 224 on server are blocked for incoming web traffic.

we need to open port 80 (http port) and port 443 (SSL / https port) for web traffic. So, here is how you can open port 80 and 443 on your server.

Login to your server as root via SSH and run following commands:

iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart

Done!!!

Our Recommended VPS Hosting

You can protect your server from XMAS Attacks and drop incoming malformed XMAS packets by applying following rule in IPTable.

Login to your server via SSH as root and run following commands:

iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP
/etc/init.d/iptables save
/etc/init.d/iptables restart

Done!!

read more

Syn-flood attacks are common these days. Syn-flood attack means that the attackers open a new connection to the server, but do not state what they want. They just want to take up servers resources and increase server load.

This type of attack can be controlled by adding a rule in IPTable to reject syn-flood attacks. Login to your server as root via SSH, and run following commands:
read more