From b98e7c24452a08f353f4ce423ba8ac52861a17dd Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 15 Feb 2020 21:52:32 +0000 Subject: [PATCH] Add option to authenticate with email address --- Dockerfile | 2 +- httpd.conf | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bcd23a3..667b2e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM httpd:alpine RUN mkdir /srv/www \ - && touch /srv/www/index.html + && touch /srv/www/index.html /srv/www/user /srv/www/mail COPY httpd.conf /usr/local/apache2/conf/httpd.conf diff --git a/httpd.conf b/httpd.conf index 7306cd8..ddd8cf8 100644 --- a/httpd.conf +++ b/httpd.conf @@ -19,19 +19,33 @@ User daemon Group daemon DocumentRoot "/srv/www" - + AuthName "forward auth" AuthBasicProvider ldap AuthType Basic - AuthLDAPURL "ldap://@@LDAP_SERVER@@/@@LDAP_BASE@@" "STARTTLS" + AuthLDAPURL "ldap://@@LDAP_SERVER@@/@@LDAP_BASE@@?uid" "STARTTLS" AuthLDAPBindDN "@@LDAP_USER@@" AuthLDAPBindPassword "@@LDAP_PASSWORD@@" DirectoryIndex index.html Require valid-user - + + + + AuthName "forward auth" + AuthBasicProvider ldap + AuthType Basic + + AuthLDAPURL "ldap://@@LDAP_SERVER@@/@@LDAP_BASE@@?mail" "STARTTLS" + AuthLDAPBindDN "@@LDAP_USER@@" + AuthLDAPBindPassword "@@LDAP_PASSWORD@@" + + DirectoryIndex index.html + + Require valid-user + ErrorLog /proc/self/fd/2 LogLevel warn