I have a Java web app built with Spring MVC running on Tomcat proxied with Apache Httpd running on an EC2 instance at AWS and configured a load balancer with SSL.
The request
first goes to load-balancer, load-balancer redirects the connection to Apache as (https to http because SSL is configured for the load-balancer)
Apache redirects to the localhost (Tomcat).
When the controller for "/first_uri" makes a redirect like
redirect:https://sub.some_domain/some_uri
I see the result at browser as
I just couldn't figure out what I must configure here, configure the Spring? configure the Apache HTTPD or the Load Balancer?
If someone faced the same issue please help.
Not: Also using Spring Security.
Not2: I just tried without SSL (using http) and the same thing happens, I think this is not related to the https usage.
Update: This problem may occur only where I try to redirect to a subdomain