Secure PhpMyAdmin Login on Ubuntu 22.04

[ad_1]

It is very important to secure phpmyadmin login access, why any hacker or attacker can damage your database by attacking phpmyadmin. Through this tutorial, we will show you two simple methods to secure PHPMyAdmin login access on ubuntu 22.04 apache 2 web server.

There are two solutions to secure PHPMyAdmin login access in Ubuntu 22.04 Apache 2 server.

  • Solution 1 – Secure PhpMyAdmin Login Page By Changing Login URL
  • Solution 2 – Secure PHPMyAdmin Access Using htpasswd

Solution 1 – Secure PhpMyAdmin Login Page By Changing Login URL

In Ubuntu, default phpmyadmin login URL can be located at Apache configuration that names apache.conf. So, you can use the 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 with 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 Using htpasswd

Create an .htpasswd file to store the username and encrypted password. Choose a secure location for this file; for example, we’ll create it in the phpMyAdmin directory:

sudo htpasswd -c /etc/phpmyadmin/.htpasswd myAdmin

Replace your_username with the desired username. You’ll be prompted to enter and confirm a password.

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

Conclusion

Through this tutorial, we have learned how to secure phpmyadmin on ubuntu 22.04 system.

[ad_2]

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

GSTIN is 03EGRPS4248R1ZD.

Contact
Jassweb, Rai Chak, Punjab, India. 143518
Item added to cart.
0 items - 0.00
نيك فى المساج abdulaporn.info فلم سكس لبناني
secretary xvideo pornborn.mobi animal and girl sex video
محجبة هايجة yubosp.com سحاق مايا خليفه
xnxxindean youporner.net xnxximages
nayanthara xvideo tubzolina.mobi pornstar list
صور سكس نياكه tinatube.net اكبربزاز
xxx indian sexy video orgyvids.info desi nude outdoor
افلام جنسيه مترجمه عربي pornclassic.info ام تتناك من صديق ابنها
www xnxx sex.com justerporn.mobi xxx2018
ولد ينيك امه مصري hqtube.org افلام سكس بث مباشر
x vidoi lamboborn.mobi indian xxx video com
اجمل نيك فى الطيز radarporn.com نيك اجنبى
passion hentai hentaicamz.com most popular hentai
youporn india indianbluetube.com spicyplumpers
xxx dilli big-porn-house.com sexi video in hindi