Report this

What is the reason for this report?

I fail to understand why PHPmyadmin is forbidden in Nginx

Posted on January 29, 2018

I fail to understand why entrance to PHPmyadmin is forbidden (http://my_ip/phpmyadmin). Here’s what I did to install it:

On a pure Ubuntu 16.04 machine (server, xenial) I’ve installed LEMP this way (MySQL root password setted on install):

apt-get update -y
apt-get upgrade nginx mysql-server php-fpm php-mysql -y

I then installed PMA:

DEBIAN_FRONTEND=noninteractive apt-get upgrade phpmyadmin php-mbstring php-mcrypt php-gettext -y
ln -s /usr/share/phpmyadmin/ /var/www/html/
chown -R www-data:www-data /usr/share/phpmyadmin/ /var/www/html
chmod -R a-x,a=rX,u+w /usr/share/phpmyadmin/ /var/www/html

As said, when navigating to (http://my_ip/phpmyadmin) I get “Forbidden (403)” HTTP status code.

I really fail to understand what’s wrong from the error log:

directory index of “/var/www/html/phpmyadmin/” is forbidden

Hence I ask what might be the problem?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.