Phpmyadmin besides pi-hole (external.conf)?

hi there,

i have setup an mariadb server, and now i want to install/use phpmyadmin with the internal webserver of the pi-hole.
i want just call phpmyadmin via http://ip-of-pi/phpmyadmin (there is no need of an dns-entry), and i need an "whitelist-entry" for it.

  • the files are saved under /var/www/html/phpmyadmin
  • the user+group are set to www-data:www-data
  • permissions are set to readable

my /etc/lighttpd/conf-available/99-external.conf is in the moment (yes, it's enabled via lighty-enable-mod external):

$HTTP["url"] =~ "^/phpmyadmin/" {
        setenv.set-response-header = ( "X-Frame-Options" => "ALLOW" )
        url.access-allow = ( "" )
}

i tried different settings, but nothing worked and all i get is an error 403.
what is my fault? i don't get it.

thank you

I didn't test anything, but I think your configuration is not executing PHP files in /phpmyadmin path.
Pi-hole default config only configures PHP for the /admin path.

You need to add PHP (fastcgi.server block) configuration for the /phpmyadmin path.

Something similar to this block, but using a different socket file and probably passing different environment variables:

that's it!
thank you very much!

this is my external.conf now, just in case.

$HTTP["url"] =~ "^/(phpmyadmin|dummyentry)/" {
        setenv.set-response-header = ( "X-Frame-Options" => "ALLOW" )
        url.access-allow = ( "" )

        accesslog.filename = "/var/log/lighttpd/access-external.log"
        accesslog.format = "%{%s}t | %h | %V | %r | %s | %b"

        fastcgi.server = (
                ".php" => (
                        "external" => (
                                "socket" => "/run/lighttpd/external-php-fastcgi.socket",
                                "bin-path" => "/usr/bin/php-cgi",
                                "min-procs" => 1,
                                "max-procs" => 1,
                                "bin-environment" => (
                                        "PHP_FCGI_CHILDREN" => "4",
                                        "PHP_FCGI_MAX_REQUESTS" => "10000",
                                ),
                                "bin-copy-environment" => (
                                        "PATH", "SHELL", "USER"
                                ),
                                "broken-scriptfilename" => "enable",
                        )
                )
        )
}