Bad value for X-Forward-* headers -- Proxy feature / Apache2 SSL vhosts

  • Hi,


    the /configs/debian/apache/parts/domain.tpl sets in case of #SECTION proxy_fwd BEGIN


    Code
    1. RequestHeader set X-Forwarded-Proto "http"RequestHeader set X-Forwarded-Port 80


    for both vhosts: SSL an not SSL. It would be perfekt if it sets for domain_ssl.conf


    Code
    1. RequestHeader set X-Forwarded-Proto "https"RequestHeader set X-Forwarded-Port 443


    Is it Possible to set different RequestHeaders via change in domain.tpl or a listener?


    My try to add row 4+5 and row 9/10 to ssl_proxy was not succesfull. The "#SECTION ssl_proxy BEGIN" as no effect.


    Thanks a lot



    ShortSnow

  • @ShortSnow



    for both vhosts: SSL an not SSL. It would be perfekt if it sets for domain_ssl.conf

    It seem that you did found a bug indeed. Both the scheme and port should vary according current context (ssl or not). Here, the headers are static (always the same scheme and port, whatever the context is while for SSL context we would expect https scheme and port 443. Will be fixed in next maintenance release.


    Is it Possible to set different RequestHeaders via change in domain.tpl or a listener?

    Of course, it is possible to override default defined sections in the vhost templates files through a listener but if you don't know our backend API, you'll have hard time to code that listener.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hello Nuxwin,


    thanks a lot. I think k a can wait for a fix ;-)


    Meanwhile i make it with a "dirty" solution at the end of the domain.tpl before the custom includes, because I have only Proxy Sites in this IMSCP.


    Code
    1. # SECTION ssl BEGIN.
    2. RequestHeader set X-Forwarded-Proto "https"
    3. RequestHeader set X-Forwarded-Port 433
    4. # SECTION ssl END.
  • @ShortSnow


    Fixed in the @konzeptplus github branch. Will be part of next maintenance release.


    See: https://github.com/i-MSCP/imsc…aad6c4a8aa90787baa8e52866


    Thank you for your report.
    Thread closed.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206