httpd-users mailing list archives

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

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 forum.csc-stuttgart.org or csc-stuttgart.org/forum.

Possibility A:

<VirtualHost *:80>
        ServerName forum.csc-stuttgart.org
        AssignUserID csc-stuttgart csc-stuttgart
        ProxyPreserveHost On
        ProxyPass        "/" "http://localhost:2080/"
        ProxyPassReverse "/" "http://localhost:2080/"
        DocumentRoot /home/csc-stuttgart/csc-stuttgart.org/pub
        [...]
</VirtualHost>

That works fine, beside on little problem. I want to use Let's Encrypt SSL certificates on
that which require a path
forum.csc-stuttgart.org/.well-known 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>
        ServerName csc-stuttgart.org
        ServerAlias *.csc-stuttgart.org
        AssignUserID csc-stuttgart csc-stuttgart
        DocumentRoot /home/csc-stuttgart/csc-stuttgart.org/pub
	[...]
        <Location forum>
                LogLevel debug
                ProxyPass http://localhost:2080/
                ProxyPassReverse http://localhost:2080/
        </Location>
</VirtualHost>


Seems to not trigger on csc-stuttgart.org/forum, 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 129.69.213.139:55350] 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 129.69.213.139:55350] AH00944: connecting http://localhost:2080/
to localhost:2080
[proxy:debug] proxy_util.c(2418): [client 129.69.213.139:55350] 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 129.69.213.139:55350] AH00128: File does not exist: /home/csc-stuttgart/csc-stuttgart.org/pub/login

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


Thanks for any ideas!

Florian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message