简体   繁体   中英

ProxyPass for https not working

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"

Add port to redirect, rewrite the proxy pass as,

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM