Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an install of Nginx, apache2 and Varnish. I have setup the following code in my default.vcl so when I browse to my /phpmyadmin it doesn't redirect to 8080.

sub vcl_fetch {
    if (req.url ~ "^/phpmyadmin") {
            return (hit_for_pass);
    }

}

I can login to PHPMyAdmin without redirect problems now. Although now PHPMyAdmin spews this error:

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

I have setup logs in multiple places, turned PHP's display_errors and other error reporting variables on. I have tried multiple browsers.

share|improve this question
1  
Have you checked your PHP & WebServer logs. Are cookies enabled in your browser? What research have you done? –  Drew Khoury Aug 26 '13 at 10:01
    
PHP and WebServer logs don't show anything out of the ordinary. Cookies are enabled in my browser and I have used multiple browsers to test. –  Stmeter Aug 26 '13 at 23:50
    
Seeing the full VCL will be usefull, since Varnish can be filtering cookies –  NITEMAN Aug 27 '13 at 11:00
    
@NITEMAN link –  Stmeter Aug 29 '13 at 0:38

1 Answer 1

Your VCL is deleting (unsetting) any cookies before making the request to the backend, so phpmyadmin won't ever get your session cookie.

Try to reorder your vcl_recv subs.

In your case I'll also try to consolidate subs in only one.

From:

sub vcl_recv {
  if (!(req.url ~ "wp-(login|admin)")) {
    unset req.http.cookie;
  }
}

To:

sub vcl_recv {
  if (req.url ~ "^/phpmyadmin") {
    return (pass);
  }
  if (!(req.url ~ "wp-(login|admin)")) {
    unset req.http.cookie;
  }
}
#...
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.