0

my Setup is like this

Visitor -> Pound -> Varnish -> nginx

My Wordpress site is looking fine from the front end (with https), but as soon i try to login to the backend this error comes up "You do not have sufficient permissions to access this page."

When i take Pound out of the chain it works fine (with Varnish only http) but nginx directly without varnish also with SSL.

This is my pound config

User            "www-data"
Group           "www-data"
LogLevel        1
Alive           30
Control "/var/run/pound/poundctl.socket"

ListenHTTP
    Address  0.0.0.0
    Port     80
    Service
        BackEnd
            Address 127.0.0.1
            Port    6081
        End
    End
End

ListenHTTPS
    HeadRemove "X-Forwarded-Proto"
    AddHeader  "X-Forwarded-Proto: https"
    Address    0.0.0.0
    Port       443
    Cert       "/etc/ssl/domain.com/mycert.pem"

    Service
        BackEnd
            Address 127.0.0.1
            Port    6081
        End
    End
End

Server is Ubuntu 14.04

thanks

1
  • 1
    Could you provide relevant parts of varnish configuration? the output of netstat -laputen when all bricks work together? can you launch tcpdump -elnXi lo port 6081 when pound is working, and tcpdump -elnXi eth0 port 80without it? As to compare both situations, to track credentials, with and without pound.
    – philippe
    May 18, 2015 at 19:29

1 Answer 1

1

Ok I found the error. Its i forgot to add those lines to the wp-config.php

define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
   $_SERVER['HTTPS']='on';

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .