Hi there, I'm using ISPConfig 3.0.5.4 (on Ubuntu 14.04 and apache 2.4.7) and I've created an SSL website. I've figured out that ISPConfig builds a vhost file with two virtualhost-entries, one for port 80 and one for 443. That's why the website is running twice, with and without ssl. Is there an easy way (with ISPConfig) to redirect the website on port 80 to the website on 443? Any hints are welcome. Kind regards Thilo
In 3.1 there's a checkbox for that under Sites > {domain} > Redirect > Rewrite HTTP to HTTPS, but I don't know if that's in 3.0.5.4 offhand. If not, just go to Sites > {domain} > Options and put this in Apache Directives: Code: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
If you have apache 2.4 better use: Code: <If "%{HTTPS} == 'off'"> Redirect permanent / https://www.domain.tld/ </If> With redirect permanent you have to enter the actual domain name, however that's what the apache guys recommend: https://wiki.apache.org/httpd/RedirectSSL The reason is that the mod_rewrite option could interfere with other rewrites... hence I think they recommend the redirect permanent.