We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon + NGINX + phpMyAdmin

Hi,

I am trying to configure NGINX to use Phalcon and phpMyAdmin.

Here is the tree of my server:

html/
    my-app
    phpmyadmin

Here is the server part of my config nginx:

server {
    listen      80;
    server_name my-app;
    root        'html/my-app/public';
    index       index.php index.html index.htm;
    charset     utf-8;

    location / {
        try_files $uri $uri/ /index.php?_url=$uri&$args;
    }

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
    }

    location ~ /\.ht {
        deny all;
    }

    location /phpmyadmin {
        root 'html/phpmyadmin';
    }
}

I get an error 404 when I go to /phpmyadmin and I don't know why.

Could you help me?

this is not a solution, it is an alternative, use HeidiSQL or Mysql Workbench even you can connect with external db

Good luck



79.0k
Accepted
answer

PMA is fat overkill, use Adminer instead: https://www.adminer.org

P.S. if you really can't live w/o PMA, look for nginx + PMA docs out there. There are few opts avail.

HeidiSQL works only on Windows, thus not interesting for most of folks/companies with 0% M$ policy.

this is not a solution, it is an alternative, use HeidiSQL or Mysql Workbench even you can connect with external db

Good luck



4.3k

Thanks a lot for your answers.

I will use Adminer.

I downloaded the latest version for MySQL (4.6.3) and putted it into "html/my-app/public/".

Here is the new server part of my config nginx:

server {
    listen      80;
    server_name my-app;
    root        'html/my-app/public';
    index       index.php index.html index.htm;
    charset     utf-8;

    location / {
        try_files $uri $uri/ /index.php?_url=$uri&$args;
    }

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
    }

    location ~ /\.ht {
        deny all;
    }
}

This is the simplest solution, much lighter than phpMyAdmin.

That's exactly what I needed, thank you.