From a7151c620b363f30bcf4e6965440daa902f222a0 Mon Sep 17 00:00:00 2001
From: Yannick Warnier
+ Since version 1.10, Chamilo requires the web server to be able to deal with redirects. This is now very common within web platforms (be them CMS, LMS, ERP, etc) and allows them, between other things, to use URLs in an efficient and user-friendly manner.
Chamilo versions prior to 1.9.0 required to choose between multiple databases and a deprecated single-database mode.
This has been cleaned up and simplified to one single database.
+
+Apache's redirects
+
+ If you don't use Apache as a web server, go to section "Rewrite configurations" at the end of this document.
+ If you do use Apache, configuring redirects is done in two small steps:
+
+
+ For Apache <=2.2:
+
+ <Directory />
+ AllowOverride All
+ Order allow,deny
+ allow from all
+ </Directory>
+
+ and for Apache >=2.4:
+
+ <Directory />
+ AllowOverride All
+ Require all granted
+ </Directory>
+
+
+ Once configured (and maybe this has already been done by your hosting provider), you can simply restart the web server to enable the change.
+
@@ -605,8 +634,10 @@ This can easily be modified by editing the app/config/configuration.php file, fi
Feel free to change this to
// Custom name_order_conventions $_configuration['name_order_conventions'] = array( - 'french' => array('format' => 'first_name last_name', 'sort_by' => 'last_name') -);
To enable .htaccess on Apache, you just need to check 1 thing: In a <Directory> block of the root folder of Chamilo, ensure the following lines are present:
+ <Directory /> AllowOverride All Order allow,deny allow from all -+ </Directory> + or, if you are working with Apache 2.4, that syntax changed a little and looks more like this:
+ <Directory /> AllowOverride All Require all granted + </Directory>
- <LocationMatch "/.git*"> + <LocationMatch "/.git*"> order deny,allow deny from all </LocationMatch> @@ -682,15 +717,20 @@ If you have issues with files taking a long time to download, make sure you reco RewriteRule ^certificates/$ certificates/index.php?id=%1 [L] RewriteRule ^courses/([^/]+)/$ main/course_home/course_home.php?cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L] + RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L] RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L] + RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L] - RewriteRule ^courses/([^/]+)/upload/(.*)$ main/courses/$1/upload/$2 [QSA,L] - RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/courses/$1/course-pic85x85.png [QSA,L] + RewriteRule ^courses/([^/]+)/upload/(.*)$ app/courses/$1/upload/$2 [QSA,L] + RewriteRule ^courses/([^/]+)/course-pic85x85.png$ app/courses/$1/course-pic85x85.png [QSA,L] RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L] + RewriteRule ^main/upload/users/(.*)/(.*)/my_files/(.*)$ app/upload/users/$1/$2/my_files/$3 [QSA,L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] + RewriteRule ^main/admin/$ main/admin/index.php [QSA,L] RewriteRule ^main/exercice/(.+)$ main/exercise/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] + RewriteRule ^courses/(.*)$ app/courses/$1 [QSA,L] </Directory>
+ Desde su versión 1.10, Chamilo requiere del servidor web que pueda gestionar redirecciones. Es algo muy comunes entre todos los sistemas web (ya sean CMS, LMS, ERP, etc) que permite, entre otras cosas, el uso inteligente y amigable de las URLs.
+ Si no usa Apache, debería consultar la sección "Configuraciones opcionales para Apache y Nginx" al fin de este documento.
+ Si usa Apache, configurar las redirecciones consta de dos pasos:
+
+ <Directory /> + AllowOverride All + Order allow,deny + allow from all + </Directory> ++ y para Apache >=2.4: +
+ <Directory /> + AllowOverride All + Require all granted + </Directory> ++
<VirtualHost *:80> ServerAdmin root@localhost - DocumentRoot /var/www/my.chamilo10.net/www - ServerName my.chamilo10.net - ErrorLog /var/log/apache2/my.chamilo10.net-error.log - CustomLog /var/log/apache2/my.chamilo10.net-access.log combined + DocumentRoot /var/www/my.chamilo.net/www + ServerName my.chamilo.net + ErrorLog /var/log/apache2/my.chamilo.net-error.log + CustomLog /var/log/apache2/my.chamilo.net-access.log combined ErrorDocument 401 /public/error-401.html DirectoryIndex index.php index.html @@ -772,22 +801,27 @@ Apache2: La configuración para nuestro sitio de ejemplo my.chamilo10.net sería Options -Indexes </Directory> - <Directory "/var/www/my.chamilo10.net/www"> + <Directory "/var/www/chamilo"> RewriteEngine On RewriteCond %{QUERY_STRING} ^id=(.*)$ RewriteRule ^([^/.]+)/?$ user.php?$1 [L] RewriteRule ^certificates/$ certificates/index.php?id=%1 [L] RewriteRule ^courses/([^/]+)/$ main/course_home/course_home.php?cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L] + RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L] RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L] + RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L] - RewriteRule ^courses/([^/]+)/upload/(.*)$ main/courses/$1/upload/$2 [QSA,L] - RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/courses/$1/course-pic85x85.png [QSA,L] + RewriteRule ^courses/([^/]+)/upload/(.*)$ app/courses/$1/upload/$2 [QSA,L] + RewriteRule ^courses/([^/]+)/course-pic85x85.png$ app/courses/$1/course-pic85x85.png [QSA,L] RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L] + RewriteRule ^main/upload/users/(.*)/(.*)/my_files/(.*)$ app/upload/users/$1/$2/my_files/$3 [QSA,L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] + RewriteRule ^main/admin/$ main/admin/index.php [QSA,L] RewriteRule ^main/exercice/(.+)$ main/exercise/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] + RewriteRule ^courses/(.*)$ app/courses/$1 [QSA,L] </Directory> php_value display_errors Off @@ -798,7 +832,7 @@ Apache2: La configuración para nuestro sitio de ejemplo my.chamilo10.net sería # E_ALL: php_admin_value error_reporting 6143 # E_ALL & ^E_NOTICE: php_admin_value error_reporting 6135 - #php_admin_value session.save_path /var/www/my.chamilo10.net/sessions/ + #php_admin_value session.save_path /var/www/my.chamilo.net/sessions/ php_admin_value short_open_tag Off php_value session.cookie_httponly 1 diff --git a/documentation/installation_guide_fr_FR.html b/documentation/installation_guide_fr_FR.html index 0addf7e83a..2ae81a5edd 100644 --- a/documentation/installation_guide_fr_FR.html +++ b/documentation/installation_guide_fr_FR.html @@ -136,6 +136,34 @@ et une installation obsolète sur une seule base. Ca a été clarifié et simplifié par l'usage d'une seule base de données.
+Redirections d'Apache
++ Depuis sa version 1.10, Chamilo exige que le serveur web puisse gérer les redirections. Il s'agit d'un pré-requis très commun de nos jours pour les applications web (autant CMS que LMS, ERP, etc) qui permet, entre autres, l'utilisation intelligente et user-friendly des URLs.
+ Si vous utilisez un autre serveur web qu'Apache, dirigez-vous à la section "Configuration de la réécriture" en fin de ce document.
+ Si vous utilisez Apache, la configuration des redirections se fait en deux étapes simples: +
+ <Directory /> + AllowOverride All + Order allow,deny + allow from all + </Directory> ++ et pour Apache >=2.4: +
+ <Directory /> + AllowOverride All + Require all granted + </Directory> ++
- <LocationMatch "/.git*"> + <LocationMatch "/.git*"> order deny,allow deny from all </LocationMatch> @@ -732,15 +760,20 @@ ou, si vous travaillez avec Apache 2.4, la syntaxe est légèrement différente RewriteRule ^certificates/$ certificates/index.php?id=%1 [L] RewriteRule ^courses/([^/]+)/$ main/course_home/course_home.php?cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L] + RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L] RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L] + RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L] - RewriteRule ^courses/([^/]+)/upload/(.*)$ main/courses/$1/upload/$2 [QSA,L] - RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/courses/$1/course-pic85x85.png [QSA,L] + RewriteRule ^courses/([^/]+)/upload/(.*)$ app/courses/$1/upload/$2 [QSA,L] + RewriteRule ^courses/([^/]+)/course-pic85x85.png$ app/courses/$1/course-pic85x85.png [QSA,L] RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L] + RewriteRule ^main/upload/users/(.*)/(.*)/my_files/(.*)$ app/upload/users/$1/$2/my_files/$3 [QSA,L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] - RewriteRule "^badge/(\d{1,})/user/(\d{1,})$" main/badge/issued.php?skill=$1&user=$2 [L] + RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] + RewriteRule ^main/admin/$ main/admin/index.php [QSA,L] RewriteRule ^main/exercice/(.+)$ main/exercise/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] + RewriteRule ^courses/(.*)$ app/courses/$1 [QSA,L] </Directory>