Topics:   Apple   -   Microsoft   -   Linux   -   Unix

How do I return an SSL URL from a non-SSL Apache?

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!

 

More Stories in Ask Metafilter: Linux