Hello,
I am a noob as far as webservers go and have been attempting to redirect webmail clients through Roundcube to https rather than http. Does anyone have any advice on how to accomplish this using XAMPP on hMailServer with Roundcube on a Windows machine?
Thank you in advance!
Cory Waltzer | Network Administrator | Hal Leonard | 507-474-9917 | mailto:cwaltzer.halleonard@outlook.com cwaltzer@halleonard.us
Hello,
a warning at the beginning: XAMPP should not be used in productive enviroments. So basically not if it's serves on internet.
Am 20.02.2014 21:03, schrieb Cory Waltzer:
I am a noob as far as webservers go and have been attempting to redirect webmail clients through Roundcube to https rather than http. Does anyone have any advice on how to accomplish this using XAMPP on hMailServer with Roundcube on a Windows machine?
There's an option inside the main configuration file of roundcube...:
// enforce connections over https // with this option enabled, all non-secure connections will be redirected. // set the port for the ssl connection as value of this option if it differs from the default 443 $rcmail_config['force_https'] = true;
If you want to do more:
You can accomplish this with a virtual host for port 80 (if applicable) and also one for port 443.
You can find those configs in /path-to-xampp/apache/conf/extra/ httpd-vhost.conf and httpd-ssl.conf is what you need. In vhost (port 80) you'll need to add the following rewrite rule (which would also work on .htaccess):
RewriteEngine on RewriteCond %{HTTP_HOST} ^([a-z.]+)$ [NC] RewriteRule ^/(.*)$ https://www.example.com/$1 [R=301,L]
This will automatically redirect to https - now you just need to make sure your ssl conf is configured well. For help on that topic, you can consult the apache documentation.
Best regards Marcel