Redirect from HTTP to HTTPS and viceversa with Apache ProxyPass

In this post I configure a url redirection from HTTP to HTTPS and viceversa using the Apache mod_proxy and the ProxyPass directive. I assume an environment consisting of two hosts: a Web Server Apache in front of a  Tomcat Applicaton Server. In the following first example the Apache ProxyPass redirects the HTTP requests to theSSL port 8443 of the Tomcat Server. In the second example the Apache Web Server is configured to accept SSL connections, so a self-signed certificate is locally installed and the requests are redirected from HTTPS to the non-ssl url of Tomcat Server.
Example 1. From Apache HTTP to Tomcat HTTPS
giuseppe-urso-redirect-http-https-01
Example 2. From Apache HTTPS to Tomcat HTTP
giuseppe-urso-redirect-http-https-02

Nhận xét

Bài đăng phổ biến từ blog này

CLEANING UP THE ZABBIX DATABASE

Configuring DHCP Relay service on the FortiGate unit

[Resolved] Amazon EC2 Redhat 7 using 6GB for the root space