×


Blog


Install phpMyAdmin with Apache on Ubuntu 18.04 - Step by Step Process ?

This article covers how to install phpMyAdmin with Apache on Ubuntu 18.04 system. While many users need the functionality of a database management system like MySQL, they may not feel comfortable interacting with the system solely from the MySQL prompt. phpMyAdmin was created so that users can interact with MySQL through a web interface. 


Important php packages includes:

  • php-mbstring: A module for managing non-ASCII strings and convert strings to different encodings.
  • php-zip: This extension supports uploading .zip files to phpMyAdmin.
  • php-gd: Enables support for the GD Graphics Library.
  • php-json: Provides PHP with support for JSON serialization.
  • php-curl: Allows PHP to interact with different kinds of servers using different protocols.


Secure Nginx with Let's Encrypt on CentOS 7 - How to do it ?

This article covers how to use the certbot Let’s Encrypt client to obtain a free SSL certificate and use it with Nginx on CentOS 7. 

Let's Encrypt is a new Certificate Authority (CA) that provides an easy way to obtain and install free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. It simplifies the process by providing a software client, Certbot, that attempts to automate most (if not all) of the required steps. 

Currently, the entire process of obtaining and installing a certificate is fully automated on both Apache and Nginx web servers.


To Install the Certbot Let's Encrypt Client:

1. Enable access to the EPEL repository on your server by typing:

$ sudo yum install epel-release

2. Once the repository has been enabled, you can obtain the certbot-nginx package by typing:

$ sudo yum install certbot-nginx


How to Install Nginx on CentOS ?

1. To install Nginx, run the command:

$ sudo yum install nginx

2. Then, start Nginx using systemctl:

$ sudo systemctl start nginx


How to configure firewall on CentOS ?

If you have a firewall enabled, make sure port 80 and 443 are open to incoming traffic.

1. If you have a firewalld firewall running, you can open these ports by typing:

$ sudo firewall-cmd --add-service=http
$ sudo firewall-cmd --add-service=https
$ sudo firewall-cmd --runtime-to-permanent

2. If have an iptables firewall running, the commands you need to run are highly dependent on your current rule set. For a basic rule set, you can add HTTP and HTTPS access by typing:

$ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT


Configure Nginx Server Blocks on CentOS 7 - Step by Step Process ?

This article covers how to create an Nginx server block configuration to host multiple website on a single CentOS server.

Server Blocks, often referred to as Nginx virtual host are a feature of the Nginx web server that allows you to host multiple websites on one server.

To Test NGINX configuration file, run the command:

$ sudo nginx --t

If the syntax is OK, the output tells you the test was successful.


To restart your Nginx web server and confirm that it's running as expected:

$ sudo systemctl restart nginx
$ sudo systemctl status Nginx


To Enable HTTPS on Domain Hosted on Nginx:

You may consider encrypting your domain using Lets Encrypt SSL to add a layer of protection and secure traffic to and from the webserver:

$ sudo dnf install certbot python3-certbot-nginx
$ sudo certbot --nginx


Install Nginx on CentOS 7 Server - Step by Step Process ?

This article covers how to Install and configure Nginx on your CentOS 7 server. Now you can deploy your applications and use Nginx as a web or proxy server. 

Nginx is a high performance web server software. It is a much more flexible and lightweight program than Apache HTTP Server.


To Install Nginx Web Server on CentOS 8:

1. Install the nginx package with:

$ sudo dnf install nginx

When prompted, enter y to confirm that you want to install nginx. After that, dnf will install Nginx and any required dependencies to your server.

2. After the installation is finished, run the following commands to enable and start the server:

$ sudo systemctl enable nginx
$ sudo systemctl start nginx

This will make Nginx start at system boot.


To configure Firewall Rules on CentOS for Nginx:

1. Run the following command to permanently enable HTTP connections on port 80:

$ sudo firewall-cmd --permanent --add-service=http

2. To verify that the http firewall service was added correctly, you can run:

$ sudo firewall-cmd --permanent --list-all

3. To apply the changes, you'll need to reload the firewall service:

$ sudo firewall-cmd --reload


Secure Apache with Let's Encrypt on Ubuntu 18.04 - How to do about it ?

This article covers how to install Let’s Encrypt SSL on Ubuntu 18.04 by using Certbot. Enabling an encrypted connection to the web server is fundamental because it allows you to use the secure HTTPS protocol for your website. Let's Encrypt, a Certification Authority issues a free certificate completely in line with the required security standards. Let's Encrypt simplifies the process for installing the security certificate to help even the less experienced user secure a website through the use of the Certbot client.


To Install Certbot client on Ubuntu:

1. First, add the Certbot repository:

$ sudo add-apt-repository ppa:certbot/certbot

You'll need to press ENTER to accept.

2. Install Certbot's Apache package with apt:

$ sudo apt install python-certbot-apache


Configure Apache Virtual Hosts on Ubuntu 18.04 - Step by Step Process ?

This article covers how to create apache virtual host files to host multiple domains on a single Ubuntu server. Each website published on the Internet is hosted on a web server (host), connected to the network with a public IP address and able to manage requests for web pages on a browser (client) such as Chrome, Firefox or Internet Explorer.

If you need to host a website on your machine, first, install a web server. Among those available, one of the best known is Apache, an open source software compatible with both Unix and Windows systems. 


How to Install Apache on Ubuntu ?

1. To install Apache 2 through the official Ubuntu repositories, proceed by typing:

$ sudo apt-get update
$ sudo apt install apache2

Since Apache communicates externally, it should be inserted among the exceptions of your Firewall. 

2. In case of using UFW, allow bidirectional communications between Apache and a Client by typing:

$ sudo ufw allow 'Apache Full'

3. Apache should already be running. To check its stateuse the command:

$ sudo systemctl status apache2