0

Combination of a webserver and a tomcat server. Everything runs under https.

The tomcat server is only accessible via a proxy server.

I want to rewrite all requests with "my_module" to the tomcat server. (tomcatmodule.war)

proxy server: 10.10.10.10:8999 tomcat server : 11.11.11.11:8443

How do I setup my VirtualHost to use the proxy server to execute then my rewrite condition.

I tried folllwoing in my

    <VirtualHost *.443>
    RewriteEngine on

    ProxyRemote "*" "https://10.10.10.10:8999"

        RewriteRule ^/my_module/(.*)  https://11.11.11.11:8443/tomcatmodule/$1 [P,QSA,L]

ProxyPassReverse /my_module/  https://11.11.11.11:8443/tomcatmodule/

Trying to forwad the request like

example.com/my_module/api

and this should end up to call the tomcat like

https://11.11.11.11:8443/tomcatmodule/api

(through the proxy server)

infrastructure overview

Jens H
  • 1
  • 2

2 Answers2

0

not tested but you could try this

ProxyRequests On
ProxyRemote * https://10.10.10.10:8999
ProxyPass /my_module https://11.11.11.11:8443/tomcatmodule/
ProxyPassReverseCookiePath tomcatmodule/ /my_module
ProxyPreserveHost On
Pascal
  • 111
  • 3
0

Problem was that I did not activate:

SSLProxyEngine on

one other super helpful tip is to raise the log level:

LogLevel debug rewrite:trace8
473183469
  • 1,360
  • 1
  • 12
  • 23
Jens H
  • 1
  • 2