SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
phpLDAPadmin
Primary tabs
Prerequisites
- PHP needs to have been compiled with gettext and LDAP support( "--with-ldap --with-gettext")
- If the web interface squawks about date.timezone, then you need to edit
/usr/local/lib/php.ini
and add a default timezone line (such asdate.timezone ="America/Thunder_Bay"
).
Installation
Make a directory to hold the website files:
mkdir -p /var/websites/private/htdocs
mkdir -p /var/websites/private/logs
Download the latest version of phpldapadmin (1.2.3 at time of writing):
cd /extra/src
wget https://github.com/leenooks/phpLDAPadmin/archive/master.tar.gz \
-O phpLDAPadmin.tar.gz
tar zxf phpLDAPadmin.tar.gz
Move the extracted files to your website htdocs root:
mv phpLDAPadmin-master /var/websites/private/htdocs/phpldapadmin
cd /var/websites/private/htdocs/phpldapadmin/config
cp config.php.example config.php
Server configuration
Edit /var/websites/private/htdocs/config/config.php
to add your LDAP server to phpldapadmin.
Find the following line and change "My LDAP Server" to something more descriptive for your LDAP server:
$server->SetValue($i,'server','name','My LDAP Server');
Assuming you are running that server on the same machine that is running phpldapadmin, add host and port lines:
$servers->setValue('server','host','127.0.0.1');
$servers->setValue('server','port',389);
Add a line for default login information:
$servers->SetValue('login','bind','cn=Manager,dc=example,dc=com');
Apache VirtualHost
Edit /usr/local/apache2/conf/httpd.conf
and add a non-standard port for it to listen on (maximum allowed is 65535):
Listen 12345
Edit /usr/local/apache2/conf/extra/httpd-vhosts.conf
and add a virtual host directive:
<VirtualHost _default_:12345>
DocumentRoot /var/websites/private/htdocs
<Directory /var/websites/private/htdocs>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/websites/private/logs/private-error_log
CustomLog /var/websites/private/logs/private-access_log combined
</VirtualHost>
Restart Apache:
svc -t /service/apache
Password protect /phpldapadmin
Require a password to access to /phpldapadmin
, by editing /usr/local/apache2/conf/extra/httpd-ssl.conf
and add a directive for our phpldapadmin directory:
<Directory "/var/websites/private/htdocs/phpldapadmin">
Order Allow,Deny
Allow from all
AuthType Basic
AuthName phpldapadmin
# You can use the htpass program to create the password database:
# htpasswd -c "/var/websites/private/phpldapadmin.passwd" admin
AuthUserFile "/usr/local/apache2/conf/phpldapadmin.passwd"
# Block access except for authenticated users
require valid-user
</Directory>
Restart Apache:
svc -t /service/apache
Create the htpasswd file:
/usr/local/apache2/bin/htpasswd -c /var/websites/private/phpldapadmin.passwd admin
- Log in to post comments