Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kanidm LDAP auth for Nagios behind Apache
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName monitoring.example.com
ServerAdmin admin@example.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/monitoring.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/monitoring.example.com/privkey.pem
ScriptAlias /cgi-bin "/usr/local/nagios/sbin/"
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride None
<RequireAll>
Require all granted
AuthName "Nagios Access"
AuthType Basic
AuthLDAPURL "ldaps://kanidm.example.com:636/dc=kanidm,dc=example,dc=com?name?sub?(name=*)" TLS
AuthBasicProvider ldap
Require valid-user
</RequireAll>
</Directory>
Alias / "/usr/local/nagios/share/"
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
<RequireAll>
Require all granted
AuthName "Nagios Access"
AuthType Basic
AuthLDAPURL "ldaps://kanidm.example.com:636/dc=kanidm,dc=example,dc=com?name?sub?(name=*)" TLS
AuthBasicProvider ldap
Require valid-user
</RequireAll>
</Directory>
</VirtualHost>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment