From 6aac46c4ef2dc22873641de8ee6248e17a1ee6cd Mon Sep 17 00:00:00 2001 From: Yoann Date: Fri, 4 Nov 2016 17:33:24 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Ajout=20d=20une=20constante=20pour=20d?= =?UTF-8?q?=C3=A9finition=20de=20la=20racine=20http=20en=20cas=20de=20vhos?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mvc/constants.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mvc/constants.php b/mvc/constants.php index 576455d..40c179c 100755 --- a/mvc/constants.php +++ b/mvc/constants.php @@ -5,7 +5,8 @@ //On définit les chemins define('PWD', '/var/www/RaspiSMS/'); //On défini le chemin de base du site - define('HTTP_PWD', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') . '/RaspiSMS/'); //On défini l'adresse url du site + define('HTTP_ROOT', '/RaspiSMS/'); //On défini la racine d'accès (selon nore vhost) + define('HTTP_PWD', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') . HTTP_ROOT); //On défini l'adresse url du site define('PWD_IMG', PWD . 'img/'); //Chemin dossier des images define('HTTP_PWD_IMG', HTTP_PWD . 'img/'); //URL dossier des images From fd91b262d9cc46ef804a20d3d0145297f857d0de Mon Sep 17 00:00:00 2001 From: Yoann Date: Fri, 4 Nov 2016 17:34:53 +0100 Subject: [PATCH 2/3] Faute de frappe, nore -> notre --- mvc/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mvc/constants.php b/mvc/constants.php index 40c179c..6548f80 100755 --- a/mvc/constants.php +++ b/mvc/constants.php @@ -5,7 +5,7 @@ //On définit les chemins define('PWD', '/var/www/RaspiSMS/'); //On défini le chemin de base du site - define('HTTP_ROOT', '/RaspiSMS/'); //On défini la racine d'accès (selon nore vhost) + define('HTTP_ROOT', '/RaspiSMS/'); //On défini la racine d'accès (selon notre vhost) define('HTTP_PWD', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') . HTTP_ROOT); //On défini l'adresse url du site define('PWD_IMG', PWD . 'img/'); //Chemin dossier des images From 9fee0451e80bf667428ab2b83a4c06dace7a3183 Mon Sep 17 00:00:00 2001 From: Yoann Date: Tue, 8 Nov 2016 10:04:08 +0100 Subject: [PATCH 3/3] Add constant for the listen port --- mvc/constants.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mvc/constants.php b/mvc/constants.php index 6548f80..930e321 100755 --- a/mvc/constants.php +++ b/mvc/constants.php @@ -4,9 +4,10 @@ */ //On définit les chemins - define('PWD', '/var/www/RaspiSMS/'); //On défini le chemin de base du site - define('HTTP_ROOT', '/RaspiSMS/'); //On défini la racine d'accès (selon notre vhost) - define('HTTP_PWD', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') . HTTP_ROOT); //On défini l'adresse url du site + define('PWD', '/var/www/html/RaspiSMS/'); //On définit le chemin de base du site + define('HTTP_ROOT', '/RaspiSMS/'); //On définit la racine d'accès (selon nore vhost) + define('HTTP_PORT', '80'); //On définit le port sur lequel est raspisms + define('HTTP_PWD', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') . ( ((HTTP_PORT != 443 AND isset($_SERVER['HTTPS'])) OR (HTTP_PORT != 80 AND !isset($_SERVER['HTTPS']))) ? ':'. HTTP_PORT : '') . HTTP_ROOT); //On défini l'adresse url du site define('PWD_IMG', PWD . 'img/'); //Chemin dossier des images define('HTTP_PWD_IMG', HTTP_PWD . 'img/'); //URL dossier des images