diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php
index 41e1dbcf5875aabd3ab1232b9bc123483c7732e2..efbd24a4c3be7914ce7b52593d27eeca2f609b60 100644
--- a/htdocs/install/etape1.php
+++ b/htdocs/install/etape1.php
@@ -27,7 +27,7 @@
  *		\version    $Id$
  */
 
-define('DONOTLOADCONF',1);	// To avoid loading conf by file inc..php
+define('DONOTLOADCONF',1);	// To avoid loading conf by file inc.php
 
 include("./inc.php");
 $setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
@@ -201,6 +201,9 @@ if ($_POST["action"] == "set")
 			}
 		}
 	}
+	
+	// Force https
+	$_POST["main_force_https"] = ((isset($_POST["main_force_https"]) && $_POST["main_force_https"] == "on")?'1':'0');
 
 	// Write conf file on disk
 	if (! $error)
@@ -559,6 +562,9 @@ function write_conf_file($conffile)
 		/* Authentication */
 		fputs($fp, '$dolibarr_main_authentication=\'dolibarr\';');
 		fputs($fp,"\n");
+		
+		fputs($fp, '$dolibarr_main_force_https=\''.$_POST["main_force_https"].'\';');
+		fputs($fp,"\n");
 
 		fputs($fp, '?>');
 		fclose($fp);
diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php
index aedcf8307f3d8ee53218da1e345bebf79e02c179..fede559879545f24843ba411db3daa17515f2492 100644
--- a/htdocs/install/fileconf.php
+++ b/htdocs/install/fileconf.php
@@ -198,6 +198,15 @@ print $langs->trans("Examples").":<br>";
 </ul>
 </tr>
 
+<tr>
+<td valign="top" class="label">
+<?php echo $langs->trans("ForceHttps"); ?>
+<td class="label" valign="top"><input type="checkbox" name="main_force_https"<?php if ($force_install_mainforcehttps) print ' checked="on"'; ?>></td>
+<td class="comment">
+<?php echo $langs->trans("CheckToForceHttps"); ?>
+</td>
+</tr>
+
 <!-- Dolibarr database -->
 
 <tr>
diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang
index d3e2d19e89505b82838214bfa2f3dc276c73115a..76585cb28165d632d776f3ecd8a8600101acdfc6 100644
--- a/htdocs/langs/en_US/install.lang
+++ b/htdocs/langs/en_US/install.lang
@@ -38,6 +38,8 @@ ConfigurationFile=Configuration file
 WebPagesDirectory=Directory where web pages are stored
 DocumentsDirectory=Directory to store uploaded and generated documents
 URLRoot=URL Root
+ForceHttps=Force secure connections (https)
+CheckToForceHttps=Check this option to force secure connections (https).<br>This requires that the web server is configured with an SSL certificate.
 DolibarrDatabase=Dolibarr Database
 DatabaseChoice=Database choice
 DatabaseType=Database type
diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang
index d9e63c4778e11ccf1eff03d9c1fdef84ca60f622..58d1637a43366460cfca8f0bc8b57c1e0e298f9b 100644
--- a/htdocs/langs/fr_FR/install.lang
+++ b/htdocs/langs/fr_FR/install.lang
@@ -38,6 +38,8 @@ ConfigurationFile=Fichier de configuration
 WebPagesDirectory=Répertoire contenant les pages web
 DocumentsDirectory=Répertoire devant contenir les documents générés (PDF, etc.)
 URLRoot=URL Racine
+ForceHttps=Forcer les connexions sécurisées (https)
+CheckToForceHttps=Cochez cette option pour forcer les connexions sécurisées (https).<br>Ceci nécessite que le serveur web soit configuré avec un certificat SSL.
 DolibarrDatabase=Base de données Dolibarr
 DatabaseChoice=Choix de la base de données
 DatabaseType=Type de la base de données