Question

I'm having set of codes in tomcat (port:8080) and another set of codes in apache (port:80). Now the default port I have set is apache (document root: /var/www/html) and for tomcat (/usr/.../webapps/ROOT)

Now tomcat codebase is running in https:// www.example.com and apache codebase is running in http://ww.example.com

I have written proxy as

ProxyPass /req https://example.com/req
ProxyPassreverse /req https://example/req

All the request from http, which contains /req will go to https://example.com/req.

But the problem is, it is redirected into http://example.com/req

what can I do to redirect to https or what can I do to run tomcat in "http"

Was it helpful?

Solution

Add port to redirect, rewrite the proxy pass as,

ProxyPass /req https://example.com:8080/req
ProxyPassreverse /req https://example:8080/req
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top