0

I am using Ubuntu 18.04 LTS Desktop to host an apache2 webserver. I installed phpmyadmin and wanted to secure it using htpasswd. There for I edited the /etc/apache2/conf-available/phpmyadmin.conf, adding AllowOverride All and restarted apache2. I checked the conf-enabled folder and saw that that had updated too. Then I created a .htaccess file in the /usr/share/phpmyadmin folder(the folder phpmyadmin.conf was referring to. I put this in the .htaccess file:

AuthType Basic
AuthName "PHPMyAdmin for servername."
AuthUserFile /etc/phpmyadmin/.htpasswd
Require valid-user

Next, I created a .htpasswd file:

htpasswd -c /etc/phpmyadmin/.htpasswd admin

Last I restarted apache2:

systemctl restart apache2

I made sure that the .htaccess and .htpasswd file were where I put them.

Most importantly:

I have looked up answers for similar problems but none of the solutions work for me!

Edit: Problem solved. Solution: be better at remembering which passwords are used for which accounts

mathmaniac88
  • 111
  • 1
  • 1
  • 7
  • Check your logs. Tell us what you tried to solve the problem. – Michael Hampton Jul 27 '18 at 21:38
  • I just tried restarting apache2 over and over again and I'm not sure what log you are talking about and where to find it – mathmaniac88 Jul 27 '18 at 21:40
  • The logs are wherever you configured them to be. If you didn't change the configuration, try looking in `/var/log/apache2` which seems to be the directory Ubuntu wants to put them in. As for restarting over and over again, is that all you did? Your question certainly implied that you tried other things, but you weren't specific, and you need to be specific. – Michael Hampton Jul 27 '18 at 21:49
  • I looked at error.log and 'password mismatch' seems to be the problem. – mathmaniac88 Jul 27 '18 at 21:53
  • I was thinking of another password, how silly! – mathmaniac88 Jul 27 '18 at 21:54

0 Answers0