BB behind SSL Reverse Proxy

  • Affected Version
    WoltLab Suite 3.0

    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
    [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%
    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"
    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
    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%
    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"
    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

    • Official Post

    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).

  • The Docker-Image is quite awesome, as it support all this configuration options but you aren't forced to use them..

    Can I set the $_SERVER vars somewhere manually?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!