Installation guide update after many issues with users not being able to enter their courses because .htaccess is not interpreted.

remotes/angel/1.11.x
Yannick Warnier 8 years ago
parent f9aaea89eb
commit a7151c620b
  1. 52
      documentation/installation_guide.html
  2. 54
      documentation/installation_guide_es_ES.html
  3. 45
      documentation/installation_guide_fr_FR.html

@ -102,6 +102,35 @@ only a specific database. Please refer to the MySQL or MariaDB documentation in
<br />
<span class="text-muted">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.</span><br />
<h3><span style="font-weight: bold;">Apache's redirects</span></h3>
<p>
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.<br />
If you don't use Apache as a web server, go to section "Rewrite configurations" at the end of this document.<br />
If you do use Apache, configuring redirects is done in two small steps:
<ul>
<li>Enable the "rewrite" module in Apache (on the command line, run "<i>sudo a2enmod rewrite</i>")</li>
<li>Configure the Apache's VirtualHost for your Chamilo to include the following block, which will allow .htaccess files within Chamilo to be interpreted</li>
</ul>
For Apache <=2.2:
<pre>
&lt;Directory /&gt;
AllowOverride All
Order allow,deny
allow from all
&lt;/Directory&gt;
</pre>
and for Apache >=2.4:
<pre>
&lt;Directory /&gt;
AllowOverride All
Require all granted
&lt;/Directory&gt;
</pre>
<br />
Once configured (and maybe this has already been done by your hosting provider), you can simply restart the web server to enable the change.
</p>
<hr style="width: 100%; height: 2px;" />
<h2><a name="2._Installation_of_Chamilo_LMS"></a><span style="font-weight: bold;">2. Installation of Chamilo LMS</span></h2>
<p>
@ -605,8 +634,10 @@ This can easily be modified by editing the app/config/configuration.php file, fi
Feel free to change this to<br />
<pre>// Custom name_order_conventions
$_configuration['name_order_conventions'] = array(
'french' => array('format' => 'first_name last_name', 'sort_by' => 'last_name')
);</pre><br />
'french' => array('format' => 'first_name last_name', 'sort_by' => 'last_name')
);
</pre>
<br />
for example. The effect should be immediate.
</p>
Please note that, although Chamilo allows you to define its position, the "title" field does not exist at this time, so no need to worry about it.
@ -653,19 +684,23 @@ If you have issues with files taking a long time to download, make sure you reco
<p>
To enable .htaccess on Apache, you just need to check 1 thing: In a &lt;Directory&gt; block of the root folder of Chamilo, ensure the following lines are present:
<pre>
&lt;Directory /&gt;
AllowOverride All
Order allow,deny
allow from all
</pre>
&lt;/Directory&gt;
</pre>
or, if you are working with Apache 2.4, that syntax changed a little and looks more like this:
<pre>
&lt;Directory /&gt;
AllowOverride All
Require all granted
&lt;/Directory&gt;
</pre>
</p>
<h3>Apache RewriteRules</h3>
<pre>
&lt;LocationMatch "/.git*"&gt;
&lt;LocationMatch "/.git*"&gt;
order deny,allow
deny from all
&lt;/LocationMatch&gt;
@ -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]
&lt;/Directory&gt;
</pre>
<h3>Nginx</h3>

@ -112,6 +112,33 @@ Nota:Esto se ha simplificado en gran medida desde la versión 1.9, ya que antes
múltiples bases de datos y un modo obsoleto de una sola base de datos.
</p>
<h3><span style="font-weight: bold;">Redirecciones de Apache</span></h3>
<p>
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.<br />
Si no usa Apache, debería consultar la sección "Configuraciones opcionales para Apache y Nginx" al fin de este documento.<br />
Si usa Apache, configurar las redirecciones consta de dos pasos:
<ul>
<li>Activar el módulo "rewrite" de Apache (en línea de comando con "<i>sudo a2enmod rewrite</i>")</li>
<li>Configurar el VirtualHost de Apache para que incluya el bloque siguiente, autorizando la interpretación de los archivos .htaccess</li>
</ul>
Para Apache <=2.2:
<pre>
&lt;Directory /&gt;
AllowOverride All
Order allow,deny
allow from all
&lt;/Directory&gt;
</pre>
y para Apache >=2.4:
<pre>
&lt;Directory /&gt;
AllowOverride All
Require all granted
&lt;/Directory&gt;
</pre>
<br />
Una vez configurada esta parte (que quizás ya esté configurada por su proveedor), basta con reiniciar el servidor web para activar el cambio.
</p>
<hr style="width: 100%; height: 2px;" />
<h2><a name="2._Installation_of_Chamilo_LMS"></a><span style="font-weight: bold;">2. Instalación de Chamilo LMS</span></h2>
@ -700,7 +727,8 @@ por ejemplo. El efecto debería ser inmediato.
location / {
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued.php?skill=$1&user=$2 last;
rewrite ^/skill/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last;
rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last;
try_files $uri @rewrite;
}
@ -716,6 +744,7 @@ por ejemplo. El efecto debería ser inmediato.
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
rewrite ^/badge/([^/]+) /main/badge/issued.php?issue=$1 last;
rewrite ^/main/exercice/(.+)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.+)$ /main/lp/$1 last;
@ -748,15 +777,15 @@ por ejemplo. El efecto debería ser inmediato.
}
</pre>
Apache2: La configuración para nuestro sitio de ejemplo my.chamilo10.net sería la siguiente:
Apache2: La configuración para nuestro sitio de ejemplo my.chamilo.net sería la siguiente:
<pre>
&lt;VirtualHost *:80&gt;
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
&lt;/Directory&gt;
&lt;Directory "/var/www/my.chamilo10.net/www"&gt;
&lt;Directory "/var/www/chamilo"&gt;
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]
&lt;/Directory&gt;
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

@ -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.
</span><br />
<h3><span style="font-weight: bold;">Redirections d'Apache</span></h3>
<p>
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.<br />
Si vous utilisez un autre serveur web qu'Apache, dirigez-vous à la section "Configuration de la réécriture" en fin de ce document.<br />
Si vous utilisez Apache, la configuration des redirections se fait en deux étapes simples:
<ul>
<li>Activer le module "rewrite" d'Apache (en ligne de commande, faites simplement un "<i>sudo a2enmod rewrite</i>")</li>
<li>Configurer le VirtualHost d'Apache pour qu'il inclue le bloc suivant, ce qui permettra l'interprétation des fichiers .htaccess</li>
</ul>
Pour Apache <=2.2:
<pre>
&lt;Directory /&gt;
AllowOverride All
Order allow,deny
allow from all
&lt;/Directory&gt;
</pre>
et pour Apache >=2.4:
<pre>
&lt;Directory /&gt;
AllowOverride All
Require all granted
&lt;/Directory&gt;
</pre>
<br />
Une fois configurée cette partie (qui est peut-être déjà mise en place par votre fournisseur d'hébergement), il suffit de redémarrer le serveur web pour activer la modification.
</p>
<hr style="width: 100%; height: 2px;" />
<h2><a name="2._Installation_of_Chamilo_LMS"></a><span style="font-weight: bold;">2. Installation de Chamilo LMS</span></h2>
@ -715,7 +743,7 @@ ou, si vous travaillez avec Apache 2.4, la syntaxe est légèrement différente
</p>
<h3>Apache RewriteRules</h3>
<pre>
&lt;LocationMatch "/.git*"&gt;
&lt;LocationMatch "/.git*"&gt;
order deny,allow
deny from all
&lt;/LocationMatch&gt;
@ -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]
&lt;/Directory&gt;
</pre>
<h3>Nginx</h3>
@ -767,7 +800,8 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a
location / {
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued.php?skill=$1&user=$2 last;
rewrite ^/skill/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last;
rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last;
try_files $uri @rewrite;
}
@ -783,6 +817,7 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
rewrite ^/badge/([^/]+) /main/badge/issued.php?issue=$1 last;
rewrite ^/main/exercice/(.+)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.+)$ /main/lp/$1 last;

Loading…
Cancel
Save