If you want to force a SSL connection to OpenEMR, insert the code below into the index.php in /var/www/openemr/index.php
Place the lines below after the line “include_once(“library/sqlconf.php”);”
/**
* Check for SSL connection to webserver
*/
if ( !isset($_SERVER[‘HTTPS’]) || ($_SERVER[‘HTTPS’] != ‘on’) ) {
echo “Do not use OpenEMR over an unsecured connection.\n\n” ; echo “\nUse this link: <a href=’https://” . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘PHP_SELF’] .”‘>https://” . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘PHP_SELF’] .”</a><br>”;
die();
}