How do I return an SSL URL from a non-SSL Apache?
October 7, 2008 4:28 AM Subscribe
Help Apache gurus! How do I setup a virtual host when SSL terminates before my Apache server?
Hopefully this is easy since it seems like a common thing...
Here's the setup: Browser -> Load balancer -> Apache Server
The browser connects to the load balancer using https (https://www.example.com). But then the load balancer directs the request to Apache using http (http://host1.company.com). Fine.
Now, how do I use the virtual host directive to have Apache return an https url to the browser? If i just have:
<VirtualHost *:80>
ServerName www.example.com
</VirtualHost>
in httpd.conf then URLs are returned to the client as http URLs which doesnt work. Is this possible? Thanks!
posted by vacapinta to computers & internet (5 answers total)
If you can't change ALL your absolute hrefs to relative, then you can try to fix the app or check your load balancer (or apache) for an in-line rewrite option to edit the pages on the fly to make the fix.
First question -- what's the app? what's generating the links? Fix that - and if you can't, fix it upstream. Next question -- what's the loadbalancer?
posted by devbrain at 5:22 AM on October 7, 2008