lemonldap-ng/po-doc/fr/pages/documentation/1.9/applications/drupal.html
2016-02-10 10:17:52 +00:00

150 lines
6.9 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"
lang="fr" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title><!-- metadata --><!-- style sheet links -->
<meta name="generator" content="Hors ligne" />
<meta name="version" content="Hors-ligne 0.1" />
<link rel="stylesheet" media="all" type="text/css" href="../../../../css/all.css" />
<link rel="stylesheet" media="screen" type="text/css" href="../../../../css/screen.css" />
<link rel="stylesheet" media="print" type="text/css" href="../../../../css/print.css" />
</head>
<body>
<div class="dokuwiki export">
<h1 class="sectionedit1" id="drupal">Drupal</h1>
<div class="level1">
<p>
<a href="/_detail/applications/drupal_logo.png?id=documentation%3A1.9%3Aapplications%3Adrupal" class="media" title="applications:drupal_logo.png"><img src="../../../../media/applications/drupal_logo.png" class="mediacenter" alt="" /></a>
</p>
</div><!-- EDIT1 SECTION "Drupal" [1-60] -->
<h2 class="sectionedit2" id="presentation">Présentation</h2>
<div class="level2">
<p>
<a href="http://drupal.org" class="urlextern" title="http://drupal.org" rel="nofollow">Drupal</a> is a <abbr title="Système de gestion de contenu">CMS</abbr> written in PHP. Il peut utiliser des modules externes pour étendre ses fonctionnalités. One of this module can be used to delegate authentication server to the web server: <a href="http://drupal.org/project/Webserver_auth" class="urlextern" title="http://drupal.org/project/Webserver_auth" rel="nofollow">Webserver Auth</a>.
</p>
</div><!-- EDIT2 SECTION "Presentation" [61-353] -->
<h2 class="sectionedit3" id="installation">Installation</h2>
<div class="level2">
<p>
Télécharger et installer le module <a href="http://drupal.org/project/Webserver_auth" class="urlextern" title="http://drupal.org/project/Webserver_auth" rel="nofollow">Webserver Auth</a>, en le décompressant dans le répertoire modules/.
</p>
</div><!-- EDIT3 SECTION "Installation" [354-526] -->
<h2 class="sectionedit4" id="configuration">Configuration</h2>
<div class="level2">
</div><!-- EDIT4 SECTION "Configuration" [527-553] -->
<h3 class="sectionedit5" id="drupal_module_activation">Activation du module Drupal</h3>
<div class="level3">
<p>
Aller dans l'interface administration et activer le module Webserver Auth.
</p>
</div><!-- EDIT5 SECTION "Drupal module activation" [554-666] -->
<h3 class="sectionedit6" id="drupal_virtual_host_in_apache">Hôte virtuel Apache hébergeant Drupal</h3>
<div class="level3">
<p>
Configurer l'hôte virtuel Drupal comme n'importe quel autre <a href="../../../documentation/1.9/configvhost.html" class="wikilink1" title="documentation:1.9:configvhost">hôte virtuel protégé</a>.
</p>
<pre class="code file apache">&lt;<span class="kw3">VirtualHost</span> *:<span class="nu0">80</span>&gt;
<span class="kw1">ServerName</span> drupal.example.com
&nbsp;
PerlHeaderParserHandler Lemonldap::NG::Handler
&nbsp;
...
&nbsp;
&lt;/<span class="kw3">VirtualHost</span>&gt;</pre>
<p>
</p><p></p><div class="noteimportant">Si Drupal est protégé par un reverse-proxy <abbr title="LemonLDAP::NG">LL::NG</abbr>, <a href="../../../documentation/1.9/header_remote_user_conversion.html" class="wikilink1" title="documentation:1.9:header_remote_user_conversion">convertir l'en-tête en variable d'environnement REMOTE_USER</a>.
</div></p>
</p>
</div><!-- EDIT6 SECTION "Drupal virtual host in Apache" [667-1133] -->
<h3 class="sectionedit7" id="drupal_virtual_host_in_manager">Hôte virtuel Drupal dans le manager</h3>
<div class="level3">
<p>
Aller dans le manager et <a href="../../../documentation/1.9/configvhost.html#lemonldapng_configuration" class="wikilink1" title="documentation:1.9:configvhost">créer un nouvel hôte virtuel</a> pour Drupal.
</p>
<p>
Configurer simplement la <a href="../../../documentation/1.9/writingrulesand_headers.html#rules" class="wikilink1" title="documentation:1.9:writingrulesand_headers">règle d'accès</a>.
</p>
<p>
Si <abbr title="LemonLDAP::NG">LL::NG</abbr> est utilisé par reverse-proxy, configurer l'<a href="../../../documentation/1.9/writingrulesand_headers.html#headers" class="wikilink1" title="documentation:1.9:writingrulesand_headers">en-tête</a> <code>Auth-User</code>, aucun autre en-tête n'est utile.
</p>
</div><!-- EDIT7 SECTION "Drupal virtual host in Manager" [1134-1487] -->
<h3 class="sectionedit8" id="protect_only_the_administration_pages">Protéger seulement la page d'administration</h3>
<div class="level3">
<p>
Avec la solution ci-dessus, tout le site Drupal sera protégé, ainsi aucun accès anonyme ne sera autorisé.
</p>
<p>
</p><p></p><div class="noteimportant">Vous ne pouvez pas utiliser la règle <code>unprotect</code> car la navigation Drupal est basée sur des requêtes basées sur des attributs (?q=admin, ?q=user, etc.), et la règle unprotect ne fonctionne que sur des correspondances d'<abbr title="Uniform Resource Locator">URL</abbr>.
</div></p>
</p>
<p>
Vous pouvez créer un hôte virtuel particulier et utiliser <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" class="urlextern" title="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" rel="nofollow">le module rewrite d'Apache</a> pour choisir entre le site ouvert et le protégé :
</p>
<pre class="code file apache">&lt;<span class="kw3">VirtualHost</span> *:<span class="nu0">80</span>&gt;
<span class="kw1">ServerName</span> drupal.example.com
&nbsp;
<span class="co1"># DocumentRoot</span>
<span class="kw1">DocumentRoot</span> /var/www/html/drupal/
<span class="kw1">DirectoryIndex</span> index.php
&nbsp;
<span class="co1"># Redirect admin pages</span>
<span class="kw1">RewriteEngine</span> <span class="kw2">On</span>
<span class="kw1">RewriteCond</span> %{QUERY_STRING} q=(admin|<span class="kw1">user</span>)
<span class="kw1">RewriteRule</span> ^/(.*)$ http://admindrupal.example.com/$1 [R]
&nbsp;
<span class="kw1">LogLevel</span> warn
<span class="kw1">ErrorLog</span> /var/log/httpd/drupal-error.log
<span class="kw1">CustomLog</span> /var/log/httpd/drupal-access.log combined
&lt;/<span class="kw3">VirtualHost</span>&gt;
&lt;<span class="kw3">VirtualHost</span> *:<span class="nu0">80</span>&gt;
<span class="kw1">ServerName</span> admindrupal.example.com
&nbsp;
<span class="co1"># SSO protection</span>
PerlHeaderParserHandler Lemonldap::NG::Handler
&nbsp;
<span class="co1"># DocumentRoot</span>
<span class="kw1">DocumentRoot</span> /var/www/html/drupal/
<span class="kw1">DirectoryIndex</span> index.php
&nbsp;
<span class="kw1">LogLevel</span> warn
<span class="kw1">ErrorLog</span> /var/log/httpd/admindrupal-error.log
<span class="kw1">CustomLog</span> /var/log/httpd/admindrupal-access.log combined
&lt;/<span class="kw3">VirtualHost</span>&gt;</pre>
</div>
</div><!-- closes <div class="dokuwiki export">--></body></html>