diff options
author | ramon <ramongomez@us.es> | 2011-09-29 11:44:14 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2011-09-29 11:44:14 +0000 |
commit | 3e24aa5543a89e0dedf9f8c0052ffeaef6613385 (patch) | |
tree | 9459c6a4427e63959f39e05cd1bc5394cec486a8 | |
parent | 3ce53a7f30d9797d870e0e7c203f0e6e232e0039 (diff) |
Versión 1.0.2: acceso a consola web por HTTPS (modifica #443).
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2329 a21b9725-9963-47de-94b9-378ad31fedc9
-rw-r--r-- | admin/WebConsole/acceso.php | 5 | ||||
-rw-r--r-- | admin/WebConsole/acceso_esp.php | 7 | ||||
-rwxr-xr-x | installer/opengnsys_uninstall.sh | 2 | ||||
-rwxr-xr-x | installer/opengnsys_update.sh | 1 |
4 files changed, 14 insertions, 1 deletions
diff --git a/admin/WebConsole/acceso.php b/admin/WebConsole/acceso.php index 1fcb7206..3dd2bcb3 100644 --- a/admin/WebConsole/acceso.php +++ b/admin/WebConsole/acceso.php @@ -11,6 +11,11 @@ if(isset($_SESSION)){ // Si existe algua sesión ... session_unset(); // Elimina variables session_destroy(); // Destruye sesión } +# Cambiar a HTTPS +if (empty ($_SERVER["HTTPS"])) { + header ("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]); + exit (0); +} include_once("controlacceso.php"); diff --git a/admin/WebConsole/acceso_esp.php b/admin/WebConsole/acceso_esp.php index 050bb0d7..20146a85 100644 --- a/admin/WebConsole/acceso_esp.php +++ b/admin/WebConsole/acceso_esp.php @@ -7,6 +7,13 @@ // Nombre del fichero: acceso.php // Descripción : Presenta la pantalla de login de la aplicación // ******************************************************************************************************** + +# Cambiar a HTTPS +if (empty ($_SERVER["HTTPS"])) { + header ("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]); + exit (0); +} + include_once("controlacceso.php"); include_once("./includes/CreaComando.php"); include_once("./clases/AdoPhp.php"); diff --git a/installer/opengnsys_uninstall.sh b/installer/opengnsys_uninstall.sh index 0331c339..fe70d6fc 100755 --- a/installer/opengnsys_uninstall.sh +++ b/installer/opengnsys_uninstall.sh @@ -38,7 +38,7 @@ if test $DROP; then mysql -u root -p"$MYSQLROOT" <<<"DROP USER '$DBUSER'@'localhost';" 2>/dev/null fi # Quitar configuración especÃfica de Apache. -a2dismod opengnsys +a2dissite opengnsys rm -f /etc/apache2/{sites-available,sites-enabled}/opengnsys* /etc/init.d/apache2 reload # Eliminar ficheros. diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 0ac572ed..015a9fca 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -309,6 +309,7 @@ function apacheConfiguration () mv $APACHECONF/sites-available/opengnsys.conf $APACHECONF/sites-available/opengnsys a2ensite default-ssl a2enmod ssl + a2dissite opengnsys.conf a2ensite opengnsys /etc/init.d/apache2 restart fi |