<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: How do I return an SSL URL from a non-SSL Apache?</title>
	<link>http://ask.metafilter.com/103607/How-do-I-return-an-SSL-URL-from-a-nonSSL-Apache/</link>
	<description>Comments on Ask MetaFilter post How do I return an SSL URL from a non-SSL Apache?</description>
	<pubDate>Tue, 07 Oct 2008 05:22:24 -0800</pubDate>
	<lastBuildDate>Tue, 07 Oct 2008 05:22:24 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: How do I return an SSL URL from a non-SSL Apache?</title>
		<link>http://ask.metafilter.com/103607/How-do-I-return-an-SSL-URL-from-a-nonSSL-Apache</link>	
		<description>Help Apache gurus! How do I setup a virtual host when SSL terminates before my Apache server? &lt;br /&gt;&lt;br /&gt; Hopefully this is easy since it seems like a common thing...&lt;br&gt;
&lt;br&gt;
Here&apos;s the setup: Browser -&amp;gt; Load balancer -&amp;gt; Apache Server&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
Now, how do I use the virtual host directive to have Apache return an https url to the browser? If i just have:&lt;br&gt;
&lt;br&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br&gt;
ServerName www.example.com&lt;br&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br&gt;
&lt;br&gt;
in httpd.conf then URLs are returned to the client as http URLs which doesnt work. Is this possible? Thanks!</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.103607</guid>
		<pubDate>Tue, 07 Oct 2008 04:28:33 -0800</pubDate>
		<dc:creator>vacapinta</dc:creator>
		
			<category>apache</category>
		
			<category>ssl</category>
		
			<category>linux</category>
		
			<category>loadbalancer</category>
		
	</item> <item>
		<title>By: devbrain</title>
		<link>http://ask.metafilter.com/103607/How-do-I-return-an-SSL-URL-from-a-nonSSL-Apache#1500097</link>	
		<description>What URLs are being returned?  Any relative hrefs will (should!) work just fine as they don&apos;t specific http/https or the server name.&lt;br&gt;
&lt;br&gt;
If you can&apos;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.&lt;br&gt;
&lt;br&gt;
First question -- what&apos;s the app?  what&apos;s generating the links?  Fix that - and if you can&apos;t, fix it upstream.  Next question -- what&apos;s the loadbalancer?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.103607-1500097</guid>
		<pubDate>Tue, 07 Oct 2008 05:22:24 -0800</pubDate>
		<dc:creator>devbrain</dc:creator>
	</item><item>
		<title>By: devbrain</title>
		<link>http://ask.metafilter.com/103607/How-do-I-return-an-SSL-URL-from-a-nonSSL-Apache#1500098</link>	
		<description>Part #2 .... you&apos;ll want ServerAlias host1.company.com, and UseCanonicalName Off within your VirtualHost block.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.103607-1500098</guid>
		<pubDate>Tue, 07 Oct 2008 05:23:37 -0800</pubDate>
		<dc:creator>devbrain</dc:creator>
	</item><item>
		<title>By: vacapinta</title>
		<link>http://ask.metafilter.com/103607/How-do-I-return-an-SSL-URL-from-a-nonSSL-Apache#1500107</link>	
		<description>oh cool thanks! Relative does work. Unfortunately absolute doesn&apos;t. I can&apos;t change the app. (Can&apos;t tell you the app without violating confidentiality)&lt;br&gt;
The loadbalancer is F5. I dont know why it hadn&apos;t occured to me to rewrite at the load balancer. Thats definitely an option!&lt;br&gt;
&lt;br&gt;
Why do I need ServerAlias? Won&apos;t Apache accept internal (behind the load balancer) URLs to the physical machine just fine by default?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.103607-1500107</guid>
		<pubDate>Tue, 07 Oct 2008 05:43:47 -0800</pubDate>
		<dc:creator>vacapinta</dc:creator>
	</item><item>
		<title>By: devbrain</title>
		<link>http://ask.metafilter.com/103607/How-do-I-return-an-SSL-URL-from-a-nonSSL-Apache#1500147</link>	
		<description>What happens by default depends on the rest of the config.&lt;br&gt;
&lt;br&gt;
If you have a NameVirtualHost on that ip:port pair already, then if you get a request for a host that&apos;s not listed as ServerName or ServerAlias, then apache will respond with the first vhost that matches.  Which may, or may not be, the one you want.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.103607-1500147</guid>
		<pubDate>Tue, 07 Oct 2008 06:43:04 -0800</pubDate>
		<dc:creator>devbrain</dc:creator>
	</item><item>
		<title>By: phax</title>
		<link>http://ask.metafilter.com/103607/How-do-I-return-an-SSL-URL-from-a-nonSSL-Apache#1500151</link>	
		<description>Sounds like a job for mod_proxy and &lt;a href=&quot;http://apache.webthing.com/mod_proxy_html/&quot;&gt;mod_proxy_html&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;i&gt;mod_proxy_html is an output filter to rewrite HTML links in a proxy situation, to ensure that links work for users outside the proxy. It serves the same purpose as Apache&apos;s ProxyPassReverse directive does for HTTP headers, and is an essential component of a reverse proxy.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
You probably might need to set up an auxiliary virtual host to act as the proxy to rewrite the content, but that shouldn&apos;t be a big problem.&lt;br&gt;
&lt;br&gt;
There&apos;s also one for XML if you&apos;re sending different sort of content.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.103607-1500151</guid>
		<pubDate>Tue, 07 Oct 2008 06:48:18 -0800</pubDate>
		<dc:creator>phax</dc:creator>
	</item>
	</channel>
</rss>
