Created
October 7, 2012 09:48
-
-
Save melvincarvalho/3847704 to your computer and use it in GitHub Desktop.
webid apache mod compliation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To Compile mod_authn_webid / mod_authz_webid / mod_auth_everyone | |
1. Follow Instructions in README -- you may need to install some packages e.g. | |
sudo apt-get update | |
sudo apt-get install autoconf gcc pkg-config libssl-dev librdf-dev apache2-threaded-dev | |
2. Download files from http://dig.csail.mit.edu/2009/mod_authn_webid/ | |
mkdir mod_authn_webid ; cd mod_authn_webid | |
wget http://dig.csail.mit.edu/2009/mod_authn_webid/Makefile.in | |
wget http://dig.csail.mit.edu/2009/mod_authn_webid/README | |
wget http://dig.csail.mit.edu/2009/mod_authn_webid/configure.in | |
wget http://dig.csail.mit.edu/2009/mod_authn_webid/mod_authn_webid.c | |
3. Download files from http://dig.csail.mit.edu/2009/mod_authz_webid/ | |
mkdir mod_authz_webid ; cd mod_authz_webid | |
wget http://dig.csail.mit.edu/2009/mod_authz_webid/Makefile.in | |
wget http://dig.csail.mit.edu/2009/mod_authz_webid/README | |
wget http://dig.csail.mit.edu/2009/mod_authz_webid/configure.in | |
wget http://dig.csail.mit.edu/2009/mod_authz_webid/mod_authz_webid.c | |
4. Download files from http://dig.csail.mit.edu/2009/mod_auth_everyone | |
mkdir mod_auth_everyone ; cd mod_auth_everyone | |
wget http://dig.csail.mit.edu/2009/mod_auth_everyone/Makefile.in | |
wget http://dig.csail.mit.edu/2009/mod_auth_everyone/README | |
wget http://dig.csail.mit.edu/2009/mod_auth_everyone/configure.in | |
wget http://dig.csail.mit.edu/2009/mod_auth_everyone/mod_auth_everyone.c | |
5. configure and install (once per mod) | |
autoconf | |
./configure && sudo make install | |
6.Add to mods available | |
sudo vi /etc/apache2/mods-available/authn_webid.load | |
LoadModule authn_webid_module /usr/lib/apache2/modules/mod_authn_webid.so | |
sudo vi /etc/apache2/mods-available/authz_webid.load | |
LoadModule authz_webid_module /usr/lib/apache2/modules/mod_authz_webid.so | |
sudo vi /etc/apache2/mods-available/auth_everyone.load | |
LoadModule auth_everyone_module /usr/lib/apache2/modules/mod_auth_everyone.so | |
sudo a2enmod authn_webid | |
sudo a2enmod authz_webid | |
sudo a2enmod auth_everyone | |
With example confs | |
<Directory /> | |
SSLVerifyClient optional_no_ca | |
SSLVerifyDepth 1 | |
</Directory> | |
<Directory /> | |
AuthType WebID | |
Require valid-user | |
</Directory> | |
<Directory /var/www/everyone/> | |
AuthWebIDAuthoritative off | |
AuthType WebID | |
Require everyone | |
</Directory> | |
Script to test mod_auth_everyone | |
<?php | |
$r = array('REMOTE_USER'=>isset($_SERVER['REMOTE_USER'])?$_SERVER['REMOTE_USER']:NULL); | |
foreach ($_SERVER as $k=>$v) { | |
if (substr($k, 0, 11) == 'SSL_CLIENT_') { | |
$r[$k] = $v; | |
} | |
} | |
header('Content-type: text/plain'); | |
print_r($r); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment