Issues with wordpress container behind nginx rev proxy


I am running wordpress in official container on an ubuntu 16.04 server with Docker version 17.05.0-ce, build 89658be. This is my docker command:

> docker run -it -d \
>   --name wordpress \
>   --restart=always \
>   -p 90:80 \
>   -e PUID=33 -e PGID=33 \
>   -e TZ=Europe/Berlin \
>   -v /docker/data/wordpress:/var/www/html  \
>   wordpress

To access it from internet I am using a Nginx container with this part of config file:

   location ^~ /blog {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
       proxy_redirect off;

wp-config.php file is added with these lines:

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)


define('WP_HOME', '');
define('WP_SITEURL', '');

I am able to access it with
configuration and link to mariadb is working well.
If I am accessing it after all of this with

I see admin page but all links which I can click at this page are like

the “blog” between// is missing.
I tried so much and wasted hundreds of kW electricity googling for a solution.
Hopefully you can help me a little please.

Thanks a lot


Same problem for me and i tried a rewrite, for me it’s okay but after doesn’t load some css and js files.

rewrite ^/blog/(.*) /blog/$1 break;