Issue accessing Wordpress dashboard behind traefik

Hey everyone,

I have a simple setup where a Wordpress and its dependencies are served in a container behind Traefik. The problem is I can't access the admin dashboard and I'm prompted with "not allowed to access this page" error. This issue doesn't occur when bypassing Traefik and accessing the container directly.

Here is my compose file:

version: '3.5'


# ------------------------ Jetware LEMP ---------------------------- #

    image: jetware/wordpress-4
    build: .
      - traefik
      - 80
      - traefik.wordpress.passHostHeader=true
      - traefik.wordpress.port=80
      - jetware-persistent-data:/jet/prs
      - ./app:/jet/app
    container_name: jetware-wordpress-4


Hey @yassine.laz,

That is because of a little missmatch in your compose file.

You're trying to hit your wordpress with the url, but you tell Traefik to proxy it on

You would have to change the label to

I made an error while writing the post and I rectified it.
The frontend was indeed If it was not, I wont be able to access wp-login and put credentials in the first place (It was after that that i was denied access).

Alright this was solved by forcing wordpress to SSL
Added this at the top of wp-config :

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_ADMIN', true);
1 Like

Glad it's solved :slight_smile: Sorry for not comming back to you yesterday. Glad its done!

1 Like