How to Secure phpMyAdmin Access with Apache on Ubuntu 18.04

How to Secure phpMyAdmin Access with Apache on Ubuntu 18.04

How to secure PHPMyAdmin login access in ubuntu apache on aws. Here, we will show you a simple 2 solution to secure PHPMyAdmin login in ubuntu apache on aws web server.

How to secure PHPMyAdmin login access in ubuntu apache on aws. Here, we will show you a simple 2 solution to secure PHPMyAdmin login in ubuntu apache on aws web server.

The first solution is to change the PHPMyAdmin login URL. And the second solution is add an extra security layer for access PHPMyAdmin login url in ubuntu 18.04 apache 2 on aws. And prevent the attacks.

Because by default, phpmyadmin login url is located on http:///phpmyadmin. So, The main reason of change phpmyadmin login url in ubuntu apache aws server to prevent attackers attack.

How to Secure phpMyAdmin with Apache 2 on Ubuntu 18.04

Now, you can see the following two solutions to secure PHPMyAdmin login access in ubuntu apache 2 on aws server.

Solution 1 – Change PhpMyAdmin Login Page URL in Apache 2 Ubuntu

In ubuntu, default phpmyadmin login url can be located at apache configuration that name apache.conf.

So, you can use sudo nano /etc/phpmyadmin/apache.conf command to open apache.conf file:

sudo nano /etc/phpmyadmin/apache.conf

Then, you can add the following line with your phpmyadmin url:

Alias /my-phpmyadmin /usr/share/phpmyadmin

Note that, you can replace my-phpmyadmin to your own word.

Now you need to restart apache 2 web server. So type the following command on your ssh terminal to restart apache service:

sudo service apache2 restart

Solution 2 – Secure PHPMyAdmin Access in ubuntu aws

Now, you can add extra security layer for access phpmyadmin login in ubuntu apache 2 on aws web server.

So, first of all, you need to create a password file with users using the htpasswd tool that comes with the Apache package. So open your ssh terminal and type the following command:

sudo htpasswd -c /etc/phpmyadmin/.htpasswd

Note that, You can choose any username instance of myAdmin with above command.

After that, one prompt box appear with password and confirm password. So, you can add password and confirm password here.

New password:
Re-type new password:
Adding password for user myAdmin

Now, you need to configure Apache 2 to password protect the phpMyAdmin directory and use the .htpasswd file.

So, open your ssh terminal and type the below command to open the phpmyadmin.conf file.

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

Then add the following lines in phpmyadmin.conf file and save it:

Options  +FollowSymLinks +Multiviews +Indexes  ## edit this line
DirectoryIndex index.php

AllowOverride None
AuthType basic
AuthName "Authentication Required"
AuthUserFile /etc/phpmyadmin/.htpasswd
Require valid-user

Finally, restart apache web server by using the following command:

sudo service apache2 restart

aws mysql ubuntu how to change and secure default phpmyadmin login url ubuntu how to change phpmyadmin login url ubuntu 18.04 how to secure phpmyadmin access how to secure phpmyadmin access with apache on ubuntu 18.04

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Install phpMyAdmin on Ubuntu 20.04 | 18.04 with Apache

Install phpMyAdmin on Ubuntu 20.04 | 18.04 with Apache - PhpMyAdmin is an open source web-based tool that allows users to easily manage MySQL or MariaDB…

How to Install and Secure phpMyAdmin with Apache on Ubuntu 18.04

phpMyAdmin is an open-source PHP application designed to handle the administration of MySQL and MariaDB servers over a web-based interface.This tutorial covers the steps necessary for installing and securing phpMyAdmin with Apache on Ubuntu 18.04.

How to Install Apache Maven on Ubuntu 20.04 | 18.04 |

This brief tutorial shows students and new users how to quickly and easily install Apache Maven on Ubuntu 20.04 | 18.04. Apache Maven comes with the default Ubuntu repositories… so all it takes is…

How to Install Apache Ant on Ubuntu 20.04 | 18.04

This brief tutorial shows students and new users how to install Apache Ant on Ubuntu 20.04 | 18.04. Apache Ant is a Java library and tool that has number of built-in tasks allowing to compile, assemble, test and run Java applications. Apache Ant is a Java library and tool that has number of built-in tasks allowing to compile, assemble, test and run Java applications. If you’re...

How to Install Apache ActiveMQ on Ubuntu 20.04 | 18.04 |

This brief tutorial shows students and new users how to install Apache ActiveMQ on Ubuntu 20.04 | 18.04 server. For those who don’t know, Apache ActiveMQ is a free, multi-protocol, Java-based message…