简体   繁体   中英

Varnish on nGinx and PhpMyAdmin Redirect Issue

I have nginx setup with Varnish in front of it, and while it works perfect (including wp-admin :)), I am finding that phpmyadmin when attached to a vhost does nothing but redirect on the home login form.

I've tried everything on Google, including adding the absolute url to pma's config... and it still happens

Is there another way I can "force" pma to be served only by nginx instead of the varnish front-end?

You could try something like this.

In the vcl_recv {} section in your varnish config you can instruct varnish to skip caching for your phpMyAdmin based on a folder location (if phpMyAdmin is installed in a folder and it's accesible like http://domain.com/phpmyadmin

sub vcl_recv {

if (req.url ~ "^/phpmyadmin") {
  return (pass);
}

Or if it's installed on a subdomain or whatever then:

sub vcl_recv {
# disable caching for applemov.com
if (req.http.host ~ "(phpmyadmin.domain.com)") {
        return(pass);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM