BB behind SSL Reverse Proxy

  • Hi @all,


    I'm trying to install the App behind a Apache2 Proxy into a Docker Container. But it doesn't work for me with my current config.



    My VHost-Config:


    And my docker-compose.yml:


  • Hi,

    the request gets caught in a loop:

  • I swiched the BE Server back to HTTP instead of HTTPS at the moment. With curl I get the Index-Page:


    and

    That's really weird: https://localhost:8905

  • Can't I set the host manually in some Config?
    Where does the BB get localhost:8905from?


    When I look in the log of the Container it seems ok:

    Code
    1. [php-fpm:access] 127.0.0.1 - 27/Jul/2017:12:39:08 +0000 "GET /acp/index.php?login/&url=http%3A%2F%2Flocalhost%3A8905%2Facp%2Findex.php" 200 /app/acp/index.php 82.866 4096 48.27%
    2. circle | circle.ting.systems:80 10.0.2.2 - - [27/Jul/2017:12:39:08 +0000] "GET /acp/index.php?login/&url=http%3A%2F%2Flocalhost%3A8905%2Facp%2Findex.php HTTP/1.1" 200 8946 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"
    3. circle | [httpd:access] localhost:80 10.0.2.2 - - [27/Jul/2017:12:39:08 +0000] "GET /acp/index.php?login/&url=http%3A%2F%2Flocalhost%3A8905%2Facp%2Findex.php HTTP/1.1" 200 bytesIn:525 bytesOut:8946 reqTime:0
    4. circle | [php-fpm:access] 127.0.0.1 - 27/Jul/2017:12:39:51 +0000 "GET /acp/index.php?login/&url=http%3A%2F%2Flocalhost%3A8905%2Facp%2Findex.php" 200 /app/acp/index.php 109.382 2048 0.00%
    5. circle | circle.ting.systems:80 10.0.2.2 - - [27/Jul/2017:12:39:51 +0000] "GET /acp/index.php?login/&url=http%3A%2F%2Flocalhost%3A8905%2Facp%2Findex.php HTTP/1.1" 200 8946 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"
    6. circle | [httpd:access] localhost:80 10.0.2.2 - - [27/Jul/2017:12:39:51 +0000] "GET /acp/index.php?login/&url=http%3A%2F%2Flocalhost%3A8905%2Facp%2Findex.php HTTP/1.1" 200 bytesIn:525 bytesOut:8946 reqTime:0

    //edit: Switched to HTTP for testing

  • Hi

    Where does the BB get localhost:8905from?

    it's taken from the HTTP_HOST value as provided by the Webserver (in your case the Apache in Docker). You might want to add a file with a <?php phpinfo(); inside the Docker container and provide me a link to it (you can send a conversation). I'll have a look at the values and may be able to suggest a fix.

  • Hi


    as expected the value inside $_SERVER['HTTP_HOST'] is incorrect, instead it is provided inside $_SERVER['HTTP_X_FORWARDED_HOST']. Unfortunately I cannot help with that, as I know next to nothing about Apache and how one would go on changing the configuration for those Dockerfiles (in fact they look uncessarily complex to me, I prefer the stock php:apache / nginx + php:fpm Dockerfiles).