Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Secure phpMyAdmin in Linux, Azure Virtual Machine
WhatsApp
Talha Bin Afzal
9y
6.9
k
0
0
25
Blog
Learn how we can install and configure phpmyadmin, there are some security issues with it lets discuss them and there solutions.
Security
phpMyAdmin has serious security vulnerability, allowing user to exploit root on underlying virtual private network. You can prevent these attacks by just locking down the whole directory with a username and password. It will secure you phpMyAdmin.
Set up .htaccess file
In order to setup .htaccess file first you have to get access to apache.conf
Sudo nano /etc/phpmyadmin/apache.conf
You will find a Directory section all you need is to add "
AllowOverride All
" it will look like this. Add.
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
[. . .]
Configure .htaccess file
With this file we are able to setup a native user to access phpmyadmin.
First create .htaccess page in the phpmyadmin directory
sudo nano /usr/share/phpmyadmin/.htaccess
Now copy and paste following text in it.
AuthType Basic
AuthName
"Restricted File"
AuthUserFile /etc/apache2/.phpmyadmin.htpasswd
Require valid-user
Now restart apache.
sodu service apache2 restart
Create htpasswd file
Now it's time to create valid username and password that you can remember.
Sudo htpasswd –c /etc/apache2/.phpmyadmin.htpasswd username
A prompt will ask you to enter a password and confirm password. Once you are done now restart apache.
Now access phpmyadmin it will ask you to enter username and password that you setup.
azure VM
Secure phpMyAdmin in Linux
Up Next
Create And Configure A Virtual Machine For Windows And Linux On Azure
Ebook Download
View all
A Guide to Azure Artificial Intelligence
Read by 6.5k people
Download Now!
Learn
View all
Membership not found