phpmyadmin on Nginx

Asked

Viewed 96 times

0

Well, I installed Ubuntu server 16.04 on my local computer, but when I access the phpmyadmin it from error 404. I’m accessing the ip_local/phpmyadmin address

Here is my virtual server

phpmyadmin:

server {
    listen 80;

    root /usr/share/phpmyadmin;
    index index.php index.html index.htm;


    location / {
            try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
            try_files $uri /index.php =404;
            fastcgi_pass unix:/run/php/php7.0-fpm.sock; #I use php7.0 : it's a problem ?
            fastcgi_index index.php;
            include fastcgi_params;
    }

}

I’m using php version 7.0 and the Nginx version is 1.10.3

  • Ever tried to add a server_name ?

  • I just did that and it didn’t work out.

  • If possible update your example. The way it is, just access the address of server_name. No need to add *path /phpmyadmin.

  • @Valdeirpsr is because it has the main site and phpmyadmin, so he wanted when the user accesses the /phpmyadmin to be redirected to /usr/share/phpmyadmin /

  • Got it. In this case you can add the root /path/to within the Location, for example: location /phpmyadmin { root /usr/share; }. However, you will have a security problem.

  • @Valdeirpsr I did it but still keeps returning 404. virtual server of pma https://hastebin.com/facoxehuvi.nginx ?

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.