ISPConfig 3 SSL automatic rewrite
Posted
by
lol
on Server Fault
See other posts from Server Fault
or by lol
Published on 2011-12-04T03:51:35Z
Indexed on
2012/10/31
5:07 UTC
Read the original article
Hit count: 493
I was wondering how you could get apache2 to redirect http://server.com:8080 to https://server.com:8080 - I have an ISPConfig 3 setup and the http://server.com:8080 virtual host currently prints a 400 back request error
given that I've tried adding
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}:8080%{REQUEST_URI} [L]
to the ispconfig.vhost file (and reloading the conf) with no success
--edit!--
I've been playing around with it and adding an 'always redirect to google' into the ispconfig vhost and it works once you've already started talking ssl to it.
this means the non-ssl connections are getting 'bad request errors' before the vhost is loaded... but where...?
--edit 2!-- nope, the ssl is handled exclusively by the virtual host - if I turn off the ssl engine then the rewriting works perfectly (but obviously there is no ssl at https://)
thanks!
© Server Fault or respective owner