Apache mod_proxy with SSL not redirecting
Posted
by
simonszu
on Server Fault
See other posts from Server Fault
or by simonszu
Published on 2013-10-26T21:52:35Z
Indexed on
2013/10/26
21:59 UTC
Read the original article
Hit count: 405
I have a custom server running behind an apache reverse proxy. Since the custom server can only handle HTTP traffic, i am trying to use apache for wrapping proper SSL around it, and for some kind of HTTP authentication.
So i enabled mod_proxy and mod_ssl and modified sites-available/default-ssl. The config is as following:
<Location /server>
order deny,allow
allow from all
AuthType Basic
AuthName "Please log in"
AuthUserFile /etc/apache2/htpasswd
Require valid-user
ProxyPass http://192.168.1.102:8181/server
ProxyPassReverse http://192.168.1.102:8181/server
</Location>
The custom server is accessible from the internal network via the location specified in the ProxyPass directive.
However, when the proxy is accessed from the outside, it presents the login prompt, and after successfully authenticated, i get a blank page with the words The resource can be found at http://192.168.1.102:8181/server
. When i type the external URL again in an already authenticated browser instance, i am properly redirected to the server frontend.
The access.log is full of entrys stating that my browser does successful GET requests, and the proxy is happily serving the /server ressource. However, the ressource isn't containing the server's frontend, but this blank page with these words on it.
© Server Fault or respective owner