FreeBSD & configuring phpMyAdmin for nginx and php-fpm

These settings are to configure phpMyAdmin to nginx, which works fine if phpMyAdmin is compiled with ports.

    server {
        listen          80;
        server_name     localhost;
        location /phpmyadmin/ {
            alias       /usr/local/www/phpMyAdmin/;
            index index.php index.html;
        location ~ ^/phpmyadmin/(.*\.php)$ {
            root                /usr/local/www/phpMyAdmin/;
            fastcgi_pass        unix:/tmp/php-fpm.sock;
            include             fastcgi_params;
            fastcgi_param       SCRIPT_FILENAME /usr/local/www/phpMyAdmin/$1;
            fastcgi_param       DOCUMENT_ROOT /usr/local/www/phpMyAdmin;

Leave a Reply

Your email address will not be published. Required fields are marked *