I'm wondering if there's a quick fragment or db setting that will allow full-time forced SSL mode for the moodle contrib.
I'd like it to operate securely as https:// like the egroupware contrib.
I did the following for forcing https: access to my LedgerSMB application. You might be able to modify it to suit your purpose...
======
Ensure Encrypted Access to LedgerSMBIn this step, set up a rewrite rule to change all ‘http://’ requests to ‘https://’ for all cases where ledgers.mydomain.ca is the virtual domain so that communication with LedgerSMB over the Internet is encrypted.
# mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
# cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
# pico 60WebRedirect{
if ($virtualHost eq "ledgers.mydomain.ca" and $port ne "443")
{
$OUT = "";
$OUT .= "# \n"
. "# RewriteRule directive for LedgerSMB - force https: \n"
. "# \n"
. " RewriteEngine on \n"
. ' RewriteRule ^/(.*)$ https://ledgers.mydomain.ca/$1 [R,L] \n';
}
else
{
' ';
}
}
Expand the template and to create a new Apache configuration file (httpd.conf)
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.confRestart the Apache web server
# /etc/rc7.d/S86httpd-e-smith restart======
Hope this helps.
John