Created
August 10, 2021 05:18
-
-
Save yaleman/1d9fe32ba381baed210e61b9139e8ce6 to your computer and use it in GitHub Desktop.
Kanidm LDAP auth for Nagios behind Apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_ssl.c> | |
<VirtualHost *:443> | |
ServerName monitoring.example.com | |
ServerAdmin [email protected] | |
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