0

http://domain/phpmyadmin login page not loading - error 403 forbidden

Setup

Default Ubuntu 18.04 server added nginx & php using apt-get

Installed the latest version of phpmyadmin manually to avoid bug in the 18.04 release. (https://stackoverflow.com/questions/48001569/phpmyadmin-count-parameter-must-be-an-array-or-an-object-that-implements-co/48682873#48682873)

http:/domain/index.php worked fine and from there other php pages would load, via the website menu, so I assumed php was working correctly. A php page with phpinfo(); worked as expected.

I had just done the setup on an identical server without a problem. What had I forgotten? As phpmyadin was outside the /var/www/html folder I thought it was a folders permissions issue.

1 Answer 1

1

Analysis

Looked in /var/log/nginx/error.log

eg 403 error http://domain/phpmyadmin eg "GET /phpmyadmin/ HTTP/1.1" 403 152 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0"

http://domain/phpmyadmin/index.php worked, bringing up the login page.

However, http://domain on its own would give a 403 error even though index.php was present.

Fix /etc/nginx/sites-available/default, added index.php, restarted the website

faulty version

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

corrected version

    # Add index.php to the list if you are using PHP
    index index.php index.html index.htm index.nginx-debian.html;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .