Add option to authenticate with email address
continuous-integration/drone/push Build is passing Details

master
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 FROM httpd:alpine
RUN mkdir /srv/www \ 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 COPY httpd.conf /usr/local/apache2/conf/httpd.conf

View File

@ -19,19 +19,33 @@ User daemon
Group daemon Group daemon
DocumentRoot "/srv/www" DocumentRoot "/srv/www"
<Directory "/srv/www"> <Location "/user">
AuthName "forward auth" AuthName "forward auth"
AuthBasicProvider ldap AuthBasicProvider ldap
AuthType Basic AuthType Basic
AuthLDAPURL "ldap://@@LDAP_SERVER@@/@@LDAP_BASE@@" "STARTTLS" AuthLDAPURL "ldap://@@LDAP_SERVER@@/@@LDAP_BASE@@?uid" "STARTTLS"
AuthLDAPBindDN "@@LDAP_USER@@" AuthLDAPBindDN "@@LDAP_USER@@"
AuthLDAPBindPassword "@@LDAP_PASSWORD@@" AuthLDAPBindPassword "@@LDAP_PASSWORD@@"
DirectoryIndex index.html DirectoryIndex index.html
Require valid-user 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 ErrorLog /proc/self/fd/2
LogLevel warn LogLevel warn