Add option to authenticate with email address
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon Bruder 2020-02-15 21:52:32 +00:00
parent c213740e72
commit b98e7c2445
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
2 changed files with 18 additions and 4 deletions

View file

@ -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

View file

@ -19,19 +19,33 @@ User daemon
Group daemon
DocumentRoot "/srv/www"
<Directory "/srv/www">
<Location "/user">
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
</Directory>
</Location>
<Location "/mail">
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
</Location>
ErrorLog /proc/self/fd/2
LogLevel warn