Varnish & phpmyadmin

Hi guys,

Hope all of you know about Varnish, the http cache server. A very good and stable one.

But last week i had some issues regarding configuration of my phpmyadmin on it.

 

Phpmyadmin issue where :

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Eveywhere you’ll find this is an issue related to session temp directory configuration. FALSE. THIS IS BULLSHIT.

Here is the solution:

Firt of all you need to setup your varnish for the domain or the phpmyadmin directory not to be cached. I set this on a specific back office subdomain name for all my administration tasks (just restrict this access by ip AND passwd on htaccess btw).

Here is the related rules:

sub vcl_fetch {

        if (req.url ~ "XXXX.YYYYYY.TLD") {
                return(pass);
        }
}

Then you’ll have to configure your phpmyadmin directory. Software is not smart enough to understand it’s run behind  varnish, so he’ll try to redirect you to your backend server (which is, I HOPE, not available by public adress/port). So configure this directive « $cfg['PmaAbsoluteUri'] » swith your phpmyadmin public internet URL.
And then setup auth_type with « http ». Problem comes from « cookie » auth. I still didn’t resolv this issue but at least this configuration works !

 

 

$i = 0;
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['PmaAbsoluteUri'] = 'http://XXXXXXXXXXX/';

 

HF dudez.

, , , ,
Trackback

no comment untill now

Add your comment now

CommentLuv badge