Default HTTPS VH to redirect to a HTTP page
am 29.03.2010 15:13:58 von Sandro Tosi
Hello,
we're setting up an Apache to respond for SSL traffic. We have a set of
VHs, each one for a different domain (we use SNI), and that part works fine.
The additional requirement is that, for every domain that doesn't have a
separate VH (so that goes into the default SSL VH) we want to redirect
to a simple HTML page.
We do not want to associate any certificate into the default SSL VH
because it will serve several domains and there won't be any cert
matching all of them; so we were thinking about redirect every request
done in the default VH to a static HTML page served in plain HTTP (by
the same Apache, but on the port 80).
The problem is that the "simple" configuration (for default SSL VH):
ProxyPass / http://localhost:80/
ProxyPassReverse / http://localhost:80/
doesn't work, returning a "Invalid method in request \x16\x03\x01 /
HTTP/1.1" because it's trying to "talk SSL" with a non-SSL VH. We also
tried a rewriterule with still with no success.
So, to make it short :) how can I redirect all the traffic we receive on
the default SSL VH to a non-SSL VH (because we don't want to have any
certificate, we think of a plain HTTP VH) or to a single (static HTML)
web page?
Thanks in advance,
Sandro
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Default HTTPS VH to redirect to a HTTP page
am 29.03.2010 15:17:32 von Tom Evans
On Mon, Mar 29, 2010 at 1:13 PM, Sandro Tosi wrote:
> Hello,
> we're setting up an Apache to respond for SSL traffic. We have a set of VHs,
> each one for a different domain (we use SNI), and that part works fine.
>
> The additional requirement is that, for every domain that doesn't have a
> separate VH (so that goes into the default SSL VH) we want to redirect to a
> simple HTML page.
>
> We do not want to associate any certificate into the default SSL VH because
> it will serve several domains and there won't be any cert matching all of
> them; so we were thinking about redirect every request done in the default
> VH to a static HTML page served in plain HTTP (by the same Apache, but on
> the port 80).
>
> The problem is that the "simple" configuration (for default SSL VH):
>
>
>
> ProxyPass / http://localhost:80/
> ProxyPassReverse / http://localhost:80/
>
>
>
> doesn't work, returning a "Invalid method in request \x16\x03\x01 /
> HTTP/1.1" because it's trying to "talk SSL" with a non-SSL VH. We also tried
> a rewriterule with still with no success.
>
> So, to make it short :) how can I redirect all the traffic we receive on the
> default SSL VH to a non-SSL VH (because we don't want to have any
> certificate, we think of a plain HTTP VH) or to a single (static HTML) web
> page?
>
> Thanks in advance,
> Sandro
>
You can't. You can configure your 'default' vhost with one of your
certificates, in which case it will work for some domains, and give
certificate errors for others. This is a limitation of SSL, not
apache.
Cheers
Tom
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org