httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Lindner <>
Subject [users@httpd] How to proxy web server?
Date Mon, 15 May 2017 15:05:10 GMT

Apache 2.4 on Debian Testing, mpm_itk

I have the Discourse web forum running in a docker container. The container's webserver is
bount to localhost:2080. The
forum should be reachable at either or

Possibility A:

<VirtualHost *:80>
        AssignUserID csc-stuttgart csc-stuttgart
        ProxyPreserveHost On
        ProxyPass        "/" "http://localhost:2080/"
        ProxyPassReverse "/" "http://localhost:2080/"
        DocumentRoot /home/csc-stuttgart/

That works fine, beside on little problem. I want to use Let's Encrypt SSL certificates on
that which require a path to be writable from the file system.
How can I take just one path out of the Proxy?

Wrap the ProxyPass/Reverse in a <LocationMatch> with a PCRE that match everything except
.well-known? Haven't tested it
yet. Any better solution?

Possibility B:

<VirtualHost *:80>
        ServerAlias *
        AssignUserID csc-stuttgart csc-stuttgart
        DocumentRoot /home/csc-stuttgart/
        <Location forum>
                LogLevel debug
                ProxyPass http://localhost:2080/
                ProxyPassReverse http://localhost:2080/

Seems to not trigger on, tried

<Location forum> and <Location /forum> and <Location forum/>.

        ProxyPass "/forum" http://localhost:2080/
        ProxyPassReverse "/forum" http://localhost:2080/

Seems to do the trick, but the Reverse does not seem to work. Error Log says

[proxy:debug] mod_proxy.c(1228): [client] AH01143: Running scheme http
handler (attempt 0)
[proxy:debug] proxy_util.c(2156): AH00942: HTTP: has acquired connection for (localhost)
[proxy:debug] proxy_util.c(2209): [client] AH00944: connecting http://localhost:2080/
to localhost:2080
[proxy:debug] proxy_util.c(2418): [client] AH00947: connected / to localhost:2080
[proxy:debug] proxy_util.c(2884): AH02824: HTTP: connection established with [::1]:2080 (localhost)
[proxy:debug] proxy_util.c(3051): AH00962: HTTP: connection complete to [::1]:2080 (localhost)
[proxy:debug] proxy_util.c(2171): AH00943: http: has released connection for (localhost)
[core:info][ client] AH00128: File does not exist: /home/csc-stuttgart/

The webserver hat localhost:2080 redirected to /login/ which does not seem to rewritten by
ProxyPassReverse to
forum/login accordingly.

Thanks for any ideas!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message