CPassMan sous Apache

De EjnTricks

CPassMan étant une application écrite en php, la mise à disposition sous Apache s'effectue en modifiant une configuration de site. La configuration mise en place s'inspire de celle de Mediawiki par exemple.

Du fait de l'importance de cette application, qui mémorise des mots de passe, il est recommandé de ne la déployer que sur un site en HTTPS, dont l'activation est expliquée ici.


Hand-icon.png Votre avis

Nobody voted on this yet

 You need to enable JavaScript to vote


Apache 2.2.X

La configuration ci dessous montre un déploiement sur le site www.dummy.net.

<VirtualHost *:80>
        ServerAdmin ejouvin@free.fr
        ServerName www.dummy.net
        DocumentRoot /var/www/dummy
        DirectoryIndex index.php index.htm index.html

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/dummy>
                Options Indexes FollowSymLinks Multiviews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error_dummy.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access_dummy.log combined

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -Multiviews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        Alias /cpassman "/var/opt/cpassman"
        <Directory "/var/opt/cpassman/">
                Options +FollowSymLinks
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>


Apache 2.4.6

Lors d'une mise à jour du serveur Ubuntu, Apache a été mis à jour en version 2.4.6. Cependant, l'impact est assez conséquent, car il y a eu une refonte de la gestion des droits d'accès.

les messages d'erreurs étant constatés dans les logs de Apache:

[Thu Dec 26 13:42:39.040047 2013] [authz_core:error] [pid 8487] [client 82.230.154.123:55568] AH01630: client denied by server configuration: /var/opt/cpassman/

La configuration a donc été modifiée afin d'être de nouveau opérationnelle:

<VirtualHost *:80>
        ServerAdmin ejouvin@free.fr
        ServerName www.dummy.net
        DocumentRoot /var/www/dummy
        DirectoryIndex index.php index.htm index.html

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/dummy>
                Options Indexes FollowSymLinks Multiviews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error_dummy.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access_dummy.log combined

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -Multiviews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        Alias /cpassman "/var/opt/cpassman"
        <Directory "/var/opt/cpassman/">
                Options +FollowSymLinks
                AllowOverride All
                # Old configuration for APACHE 2.2
                # Order allow,deny
                # Allow from all
                Require all granted
        </Directory>

</VirtualHost>