Archive

CMS (Content Management System) and Types of it

CMS stands for Content Management System. As it’s obvious by its name is a system that helps you manage the content of your website. When you have a website that you need to publish daily posts on it or add simple content to it every now and then, you’ll probably need something to help you do this stuff the easiest way. The best Content Management System is the one that is easy to set up and has a good UI to work with.

A CMS helps you edit, manage, and create your website content without having lots of experience or any special knowledge that is too hard to learn. Some people think Content management systems as a theme. However, a theme can also be a part of a Content Management System and not all of it. When you use a Content Management System, you don’t need to create and code your website from scratch. It just gives you some pre-coded basics and you can either add others by coding or just simply use one of its many themes to make life much easier.

Types of CMS

One way to categorize Content management systems(CMS) is to say that we have two types of them:

  1. Proprietary
  2. Open-Source

Proprietary CMS

The developers keep the codes closed to the public and it’s maintained by one company/person/team. The creators of that CMS hand it to their users with a license and it is not editable by the public.

Open-Sourced CMS

Just like any other open-sourced software, it is editable by the public. The most famous content management systems are Joomla, WordPress, and Drupal. These CMSs can be used without a license and freely by users. Users can also edit and personalize it however they want.

Benefits of using an open-sourced CMS:

  1. It’s free or low-cost.
  2. License-free.
  3. Anyone can use it.
  4. There are tons of free themes and plugins for it.
  5. It’s easy to optimize.

WordPress

Perfect for beginners and small businesses. (Not that you can’t use it for any types of websites) It has a very simple UI and is very easy to work with.

Joomla

It’s a bit harder than WordPress to work with and needs more skills. However, we can say that it’s more powerful than the other two. Joomla works perfectly for a weblog.

Joomla

Drupal

Lots of big companies like McDonald’s, AT&T, and Standford University are using this CMS. Drupal can be tough for people who have just started programming.

Hope you enjoyed this post if you did, you can visit our blog for more!

IIS Installation Guide

In this post, we are going to walk you through the IIS installation on a Windows server.

In our post about the web server, we explained what a web server is. To refresh your memory let’s give you a short explanation. A web server is a service or a feature that a server can serve to you. If you want to have a website on your server that you want the world to be able to visit it, you MUST have a web server on that server. Some web servers can only run on Linux and others on Windows. Nginx, LiteSpeed, and Apache are the three most famous Linux WebServers. But do we have Windows web servers too? Sure we do! We’ve introduced and explained fully about IIS before. IIS is a famous windows web server that works perfectly on windows servers. So let’s start the IIS installation on a Windows server.

IIS Installation

First, you need to log into your server using the remote desktop connection. From the start menu, open “Server Management”.

Server Management

As shown in the picture, click on the “Add roles and features” to start the installation. (If you can’t find this option there, on the top-right section click on tools and then choose “Add roles and features” from the drop-down.

Before-you-begin

On the “Before you begin” page, click on next.

Now on the ” Select installation type” choose the “Role-based or feature-based installation” and click next.

Select installation type

Here on the “Select a server from the server pool” you need to choose the server that you want to start IIS installation on.

On the next page that is “Select Server Roles”, find WebServer(IIS) and click on “Add Features” when a new window shows up. Click next to continue.

We just need to hit next for the next two steps and continue.

What you see here is the “Select role services” page. On this step, you can choose extra IIS features and services if needed. If you don’t need anything else just let it be in its default way. (You don’t need to worry about this part since you can always add those features and services in the future)

On the next page click on Install to start the IIS installation.

*There’s a “restart after installation” option here which is not an obligation but if you check that your system will be restarted after installation is done.*

After the installation is done you can close the window and now the IIS web server should work properly with the port 80 of the server’s firewall.

Installation-Compeleted

Now you can see IIS on the start menu of your server.

Hope you enjoyed this post if you did, you can visit our blog for more!

How to Switch from Apache to Nginx

In our recent series of posts, we have explained a lot of things about Linux web servers. The three main Linux web servers that we introduced were Nginx, Apache, and Lite Speed. We said some pros and cons for each of them. We also mentioned that Apache is the most commonly used web server all over the world. For any reason, you may choose a web server and then decide to change it later. In this post, we are going to show you how you can switch your web server from Apache to Nginx.

Switch from Apache to Nginx Web Server

The first thing you need to do is establishing an SSH connection to your server using Softwares like PuTTY. You need to have root access to your server. So, if your service is anything that doesn’t give you the root access, you need to ask your hosting provider to switch the webserver for you.

After logging into the server using PuTTY, you need to check the version of your control panel‘s “Custombuild”. Use the commands below to check and upgrade.

Check the Version:

 cd /usr/local/directadmin/custombuild
./build version 

Upgrade the Version:

 cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
./build 

Now we can simply use this command to switch from Apache to Nginx:

 cd /usr/local/directadmin
./build set webserver nginx 

This is what you are going to see at the end of the process:

After this, you need to change the PHP handler. We’ve already explained that every webserver has its own ph handler. Apache supports almost all of PH handles. So here we need to change the PHP handler to PHP-FPM.

 /build set php1_mode php-fpm

Now copy and paste these commands in turn:

 ./build update 
 ./build all d 

*This Process may take more or less than 20 minutes depending on the server’s RAM.*

Build Update

Let’s finish the installation:

 ./build rewrite_confs 
Nginx installation

As the last step, restart Nginx to finish the process:

 /sbin/service nginx restart 

You have successfully switched your webserver from Apache to Nginx!

Hope you enjoyed this post if you did, you can visit our blog for more!

Setup Nginx Server Block (Part 2)

In our last post, we explained that if you want to handle more than one domain using Nginx, you need to set up the Nginx Server block. We also explained half of the steps so if you haven’t checked that out yet, here is the link:

We completed setting up the Nginx server block for the first domain so let’s go and setup the second server block.

Setup the second Nginx server block

We need to do the exact same thing for the second domain. There is only going to be one difference through this process and it’s that we need to remove default_server from the listen directory in config file. This is because we can only have one default_server or else the webserver won’t work.

There is a default server block in this path:

/etc/nginx/sites-available/default

Now we copy the file with a new name based on the domain:

sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/mytest2.com

Then we need to edit the file:

sudo nano /etc/nginx/sites-available/mytest2.com

Scroll the file to find the “listen” section:

Edit file

Remove default_server from the “listen” section:

Find the root /var/www/html in the mentioned file and replace it with the path of the directory you made earlier. For example /var/www/mytest2.com/public_html.

Now find the server_name _;  line and change the domain name. (You can search for this line using Ctrl+W)

Save the changes and close the file. (Use Ctrl+X then Y to save changes)

Just like the other one let’s make sure the Nginx config file exists:

sudo nginx -t

You should see this as a result:

You are done setting up the second Nginx server block.

Creating a Symbolic Link

Now we are going to create a symbolic link from sites-available in the sites-enabled directory. This will technically call the Nginx web server.

sudo ln -s /etc/nginx/sites-available/mytest1.com /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/mytest2.com /etc/nginx/sites-enabled/

Remove the symbolic link from the default server:

sudo rm /etc/nginx/sites-enabled/default

Restart Nginx:

sudo service nginx restart

Test

Assuming that you have already done all the DNS configurations on the Domain side and it’s pointing to the Server‘s IP, you can see the test page on your browser.

Nginx Test Page

Hope you enjoyed this post if you did, you can visit our blog for more!

Setup Nginx Server Blocks (Part 1)

Based on our previous posts, now you know a lot about web servers and especially about Linux web servers. We’ve explained about LiteSpeed, Apache, and Nginx Web Server and compared them. We said it multiple times that although Nginx doesn’t have a GUI but it’s amazing for handling more than one domain. To handle multiple domains, first you need to setup server blocks. In this post, we’re going to show you how you can do that.

So, installing Nginx and configuring its firewall, you need to setup server blocks. We think that even if you want to handle one domain with this, it’s a good idea to setup the server block to make adding other domains easier in the future.

Making Directories

In this post, we are going to use these two to setup server blocks and make new directories:

  • mytest1.com
  • mytest2.com

The first step is to create two directories for two domains:

sudo mkdir -p /var/www/mytest1.com/public_html
sudo mkdir -p /var/www/mytest2.com/public_html

If you want the files to be editable by users other than the root, use these commands:

sudo chown -R $(whoami):$(whoami) /var/www/mytest1.com/public_html
sudo chown -R $(whoami):$(whoami) /var/www/mytest2.com/public_html

Create a text page

let’s create an index.html page for each domain:

sudo echo "Welcome to mytest1.com!" > /var/www/mytest1.com/public_html/index.html
sudo echo "Welcome to mytest2.com!" > /var/www/mytest2.com/public_html/index.html

Setup the first server block

There is a default server block in this path:

/etc/nginx/sites-available/default

Now we copy the file with a new name based on the domain:

sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/mytest1.com

Then we need to edit the file:

sudo nano /etc/nginx/sites-available/mytest1.com

Find the root /var/www/html in the mentioned file and replace it with the path of the directory you made earlier. For example: /var/www/mytest1.com/public_html

Edit file

Now find the server_name _;  line and change the domain name. (You can search for this line using Ctrl+W)

Save the changes and close the file. (Use Ctrl+X then Y to save changes)

Before going for the next step, let’s make sure the Nginx config file exists:

sudo nginx -t

You should see this as a result:

The first server block has been set up and in our next post, we’ll show you how to set up the second one. Make sure to check that post to finish the setup of the server blocks.

Hope you enjoyed this post if you did, you can visit our blog for more!

Nginx Installation and Firewall Configuration

In this post, we’ll explain the installation for the latest version of Nginx and its firewall configuration.

Nginx is one of Linux web servers which has lots of pros and cons. One thing about Nginx is that it doesn’t have a panel on control panels like other web servers. So this makes things a bit harder but still manageable. In our last post, we explained how you can install SSL with having Nginx as your web server.

Nginx Web Server

Nginx Installation

Connect to your server using an SSH connection. Now use the command below to download and install the latest version of Nginx on your server.

sudo apt update && sudo apt install nginx
sudo apt install -y nginx

After the installation, you can check the installed version using this command:

nginx -v

Then you need to check the web server’s status as we want it to be up and running:

sudo service nginx status

The Nginx installation is complete and now you need to configure the firewall.

Firewall Configurations

After the installation, we recommend you to enable ufw so you’ll be able to add rules on Nginx. (Before doing that, check your SSh access so you won’t get blocked.)

sudo ufw allow OpenSSH

Now let’s add rules on Nginx:

sudo ufw allow 'Nginx HTTP'

You should see this:

Rule added
Rule added (v6)

Enabling ufw in Firewall:

sudo ufw enable

Now let’s check the Firewall’s status:

sudo ufw status

You should see this:

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
Nginx HTTP                 ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
Nginx HTTP (v6)            ALLOW       Anywhere (v6)

Nginx installation is done and it’s up and running now!

In our next post, we are going to show you how you can handle more than one domain with Nginx web server.

Hope you eno=joyed this post if you did, you can visit our blog for more!

Installing SSL Certificate on Nginx

In our last post, we compared Nginx and LiteSpeed. These two are two popular Linux web servers. One of the things that we mentioned about Nginx was that it can’t be controlled by control panels like other web servers. Both Apache and LiteSpeed have their panels on DirectAdmin, cPanel and etc. Obviously, it’s much easier to install SSL using control panels like DA, cPanel, Plesk, CyberPanel, and etc but in this post, we’re going to show you how you can install SSL on Nginx.

Before installing SSL you need to finish ordering an SSL certificate and get the needed files from the provider. The files that you’re gonna need are:

  • The certificate file
  • Private key
  • CSR
  • Ca

*To get the private key, you can use online CSR Generators*. So just go to CSRgenerator.com and fill in the forms to get your CSR and private key so you can install SSL.

Installing SSL on Nginx

1. Login to the server using an SSH connection.

2. Go to the address below and create a .key and a .crt file.

etc/Nginx/SSL

So you’re going to create two files like your-domain-name.crt and your-domain-name.key using the touch command. Now copy what’s in the Private key file and paste it in the .key file. Then copy what’s in the certificate and ca file and paste it in the .crt file. Save your changes and go for the next step.

3. Now you need to edit the Nginx configuration file. To do that, go to nginx.conf and add this to the Nginx configuration file:

server {listen   ۴۴۳; ssl    on; ssl_certificate    /etc/ssl/your_domain_name.crt; ssl_certificate_key    /etc/ssl/your_domain_name.key;

Also, go to the Nginx virtual hosts file from the path below and add the same lines to it:

/etc/nginx/sites-available/yourdomain

The installation is complete and your SSL is ready to use.

Hope you enjoyed this post if you did, you can visit our blog for more!

Nginx vs LiteSpeed Web Server

In our post about different Linux web servers, we talked about Apache, Nginx, and LiteSpeed. In this post, we are going to compare the Nginx and LiteSpeed Web server specifically.

Both of these web servers have free and premium versions. So there is not much of a difference in their cost. Mostly, LiteSpeed is compared with Apache but it has lots of similarities with Nginx so this comparison is much more useful.

LiteSpeed vs Nginx

LiteSpeed can read all the Apache files like mod_rewrite, mod_security but Nginx can’t do the same. Also one of the biggest weak points of Nginx is that it can’t read .htacess file.

LiteSpeed web server and Apache can be controlled by control panels like DirectAdmin, cPanel and Plesk. But Nginx isn’t like that.

Now let’s say some of the good features of Nginx. The best thing about Nginx is that it can handle a high number of visits. So this is a very popular web server for websites with lots of views.

Fortunately, both Nginx and LiteSpeed use ModSecurity rules and protect server from multiple attacks. So they have a similar function in the security subjects.

There are lots of other amazing features about Nginx which we talked about them in the post about Nginx before.

In the end, we can’t obviously tell you which web server is the best for everyone. Each website has its own needs and you need to carefully compare and consider each web server’s features and choose the one that matches your needs the best. One thing we can suggest is that if you are starting a website, Apache is most probably the best option for you. You can always switch to LiteSpeed web server later. However, switching from Apache to Nginx is a bit tricky and hard.

Hope you enjoyed this post if you did, you can visit our blog for more!

Nginx Web Server

Previously, we’ve talked about what a web server is and what different Linux web servers are. We also explained about Apache which is the most commonly used Linux web server in the world. In this post, we are going to talk about Nginx which is another Linux web server.

What is Nginx?

Nginx is a very successful open-source web server that is also used as a reverse proxy, load balancer, and HTTP cache. From the start, it worked on high performance and optimized RAM usage. This web server is compatible with lots of operating systems like OS X, Linux, HP-UX, Solaris and etc.

Nginx best Features

Here are some of it’s best features:

  • It can support and manage more than 10000 simultaneous connections with low RAM usage.
  • Load Balancing
  • Fault tolerance
  • Supports SPDY protocol
  • The ability to compress and extract gzip files
  • Supports STARTTL
  • and etc…

There are also some cons about this web server which are:

  • It doesn’t offer us an easy GUI to use. But it has a built-in dashboard that allows you to control things by it. 
  • It doesn’t support .htaccess file.

Nginx Installation on WHM

This web server has a very easy installation. All you have to do is to connect to your server using an SSH connection and then copy and paste these commands in turn:

cd /usr/local/src
wget http://nginxcp.com/latest/nginxadmin.tar
tar xf nginxadmin.tar 
cd publicnginx
./nginxinstaller install

After the installation you can go to the Plugins section of WHM, to see the Nginx plugin that you have just installed.

So from now on, the Nginx will replace Apache in your server and will be used by all websites.

Uninstall Nginx from WHM

You can use those simple commands above for installation but replace “Install” with “uninstall” in the last line.

cd /usr/local/src
wget http://nginxcp.com/latest/nginxadmin.tar 
tar xf nginxadmin.tar
cd publicnginx
./nginxinstaller uninstall

We hope that you enjoyed this post. If you did, you can check our blog for more!

Apache Web Server

Apache HTTP Server is one of the famous Linux web servers. It is the most commonly used web server all over the world. They created this web server based on NCSA HTTPd and had a major role in world wide web’s growth. After overtaking the NCSA HTTPd, Apache became the most popular web server for HTTP from 1996. In 2009, it became the first web server software in the world by supporting more than 100 million websites. This Web Server is a free and open-source webserver that works the best on Unix and Linux servers. However, it is also accessible on Microsoft, OS X, Solaris Novell NetWare, FreeBSD, EComStation, OpenVMS, TPF, Windows and etc.

Why They named it Apache?

At first they said the name ‘Apache’ was chosen from respect for the Native American Indian tribe of Apache (Indé), well-known for their superior skills in warfare strategy and their inexhaustible endurance. But the reason on their FAQ page changed to this: A cute name which stuck. Apache is “A Patchy server”. It was based on some existing code and a series of “patch files”. And now it means much more than that. It is the first and foremost the Apache Software Foundation, under which there are dozens of projects.

As we mentioned in the post about Linux web servers, Nowadays Apache is the default web server for most control panels. It is a modular web server which makes it very flexible and easy to use. It pretty much has a module for anything you want along with a good GUI. We should also say that you can choose any PHP handler you want with this web server. It can work perfectly for you if you want to handle multiple websites on your server.

Hope you enjoyed this post if you did, you can visit our blog for more!