<ahref="http://drupal.org"class="urlextern"title="http://drupal.org"rel="nofollow">Drupal</a> is a <abbrtitle="Content Management System">CMS</abbr> written in PHP. It can works with external modules to extends its functionalities. One of this module can be used to delegate authentication server to the web server: <ahref="http://drupal.org/project/Webserver_auth"class="urlextern"title="http://drupal.org/project/Webserver_auth"rel="nofollow">Webserver Auth</a>.
Install <ahref="http://drupal.org/project/Webserver_auth"class="urlextern"title="http://drupal.org/project/Webserver_auth"rel="nofollow">Webserver Auth</a> module, by downloading it, and unarchive it in the drupal modules/ directory.
Configure Drupal virtual host like other <ahref="../../../documentation/1.9/configvhost.html"class="wikilink1"title="documentation:1.9:configvhost">protected virtual host</a>.
<p><divclass="noteimportant">If you are protecting Drupal with <abbrtitle="LemonLDAP::NG">LL::NG</abbr> as reverse proxy, <ahref="../../../documentation/1.9/header_remote_user_conversion.html"class="wikilink1"title="documentation:1.9:header_remote_user_conversion">convert header into REMOTE_USER environment variable</a>.
Go to the Manager and <ahref="../../../documentation/1.9/configvhost.html#lemonldapng_configuration"class="wikilink1"title="documentation:1.9:configvhost">create a new virtual host</a> for Drupal.
Just configure the <ahref="../../../documentation/1.9/writingrulesand_headers.html#rules"class="wikilink1"title="documentation:1.9:writingrulesand_headers">access rules</a>.
If using <abbrtitle="LemonLDAP::NG">LL::NG</abbr> as reverse proxy, configure the <code>Auth-User</code><ahref="../../../documentation/1.9/writingrulesand_headers.html#headers"class="wikilink1"title="documentation:1.9:writingrulesand_headers">header</a>, else no headers are needed.
<p><divclass="noteimportant">You cannot use the <code>unprotect</code> rule because Drupal navigation is based on query strings (?q=admin, ?q=user, etc.), and unprotect rule only works on <abbrtitle="Uniform Resource Locator">URL</abbr> patterns.
You can create a special virtual host and use <ahref="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">Apache rewrite module</a> to switch between open and protected hosts: