Alias /phpmyadmin @TERMUX_PREFIX@/share/phpmyadmin

<Directory @TERMUX_PREFIX@/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php
    Require all granted

    # PHP 8+
    <IfModule mod_php.c>
        php_value error_reporting "E_ALL & ~E_DEPRECATED"
        php_value include_path .
        php_admin_value open_basedir @TERMUX_PREFIX@/share/phpmyadmin:@TERMUX_PREFIX@/etc/phpmyadmin:@TERMUX_PREFIX@/var/lib/phpmyadmin
        php_admin_value upload_tmp_dir @TERMUX_PREFIX@/var/lib/phpmyadmin/tmp
        php_admin_value session.save_path @TERMUX_PREFIX@/var/lib/phpmyadmin/sessions
    </IfModule>

</Directory>

# Authorize for setup
<Directory @TERMUX_PREFIX@/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
        AuthType Basic
        AuthName "phpMyAdmin Setup"
        # To create it, run htpasswd -c @TERMUX_PREFIX@/etc/phpmyadmin/htpasswd.setup my-username
        AuthUserFile @TERMUX_PREFIX@/etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory @TERMUX_PREFIX@/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory @TERMUX_PREFIX@/share/phpmyadmin/vendor>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory @TERMUX_PREFIX@/share/phpmyadmin/setup/lib>
    Order Deny,Allow
    Deny from All
</Directory>
