Operating System - Linux
1821187 Members
3200 Online
109631 Solutions
New Discussion юеВ

Re: howto redirect SquirrelMail from http to https using Apache2 ?

 
SOLVED
Go to solution
'chris'
Super Advisor

howto redirect SquirrelMail from http to https using Apache2 ?

hi

howto redirect SquirrelMail from http to https using Apache2 ?

I've tried to add the following entry:

# cat /etc/apache2/sites-enabled/000-default


Alias /mail /usr/share/squirrelmail


php_flag register_globals off
Options Indexes FollowSymLinks

DirectoryIndex index.php


# access to configtest is limited by default to prevent information leak

order deny,allow
deny from all
allow from 127.0.0.1






RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://mydomain.net/mail [L]





but it doesn't work.

kind regards
chris
5 REPLIES 5
Matti_Kurkela
Honored Contributor

Re: howto redirect SquirrelMail from http to https using Apache2 ?

Hmm... the /etc/apache2/sites-enabled looks like Debian's configuration style...

Apparently you have both HTTP and HTTPS served using the same configuration file. It would be easier to split the configuration in two, and have one "site" for HTTP traffic and another for HTTPS.

The mod_rewrite is a powerful but cryptic tool. For this I would recommend using the Redirect and/or RedirectMatch directives: they're simpler to use.

If you can separate the HTTP and HTTPS configurations,
Redirect /mail https://mydomain.net/mail
should do the trick.

MK
Steven E. Protter
Exalted Contributor
Solution

Re: howto redirect SquirrelMail from http to https using Apache2 ?

Shalom chris,

You don't redirect it in httpd.

You go to the squirrellmail plugins page. Choose the https/secure plugin package.

Unzip the plugin.

follow installation instructions.

install it.

restart httpd server

By default it logs in https and then goes normal for mail composition and reading.

It comes with a configuration file that is english readable and can be set for all https operations.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
'chris'
Super Advisor

Re: howto redirect SquirrelMail from http to https using Apache2 ?

thanks, but cannot find this plugin file:

ext:/usr/share/squirrelmail/plugins# ls

README.plugins
abook_take
administrator
bug_report
calendar
delete_move_next
filters
fortune
index.php
info
listcommands
mail_fetch
make_archive.pl
message_details
newmail
sent_subfolders
spamcop
squirrelspell
translate
Nils_9
Advisor

Re: howto redirect SquirrelMail from http to https using Apache2 ?

Hi,

you should find all the plugins you need for Squirrelmail on the website : www.squirrelmail.org/plugins.php

Hope this helps,

Nils
'chris'
Super Advisor

Re: howto redirect SquirrelMail from http to https using Apache2 ?

this problem is solved:

# a2enmod rewrite
Module rewrite installed; run /etc/init.d/apache2 force-reload to enable.