This commit is contained in:
Eric Meehan 2024-08-06 11:45:36 -04:00
parent fd270a9f95
commit 861aade5e9
5 changed files with 24 additions and 1 deletions

View File

@ -3,6 +3,7 @@ LoadModule cgi_module modules/mod_cgi.so
SetEnv GIT_PROJECT_ROOT /usr/local/apache2/htdocs
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \

7
files/httpd-ssi.conf Normal file
View File

@ -0,0 +1,7 @@
LoadModule include_module modules/mod_include.so
AddOutputFilter INCLUDES .shtml
<Directory "/usr/local/apache2/htdocs">
Options +Includes
</Directory>

View File

@ -1688,7 +1688,7 @@ text/csv csv
# text/example
# text/fwdred
# text/grammar-ref-list
text/html html htm
text/html html htm shtml
text/javascript js mjs
# text/jcr-cnd
text/markdown md

View File

@ -5,6 +5,7 @@
httpd_server_name: "www.eom.dev"
httpd_conf_extra:
- httpd-auth.conf
- httpd-ssi.conf
k8s:
state: present
api_version: v1
@ -15,6 +16,7 @@
data:
httpd.conf: "{{ lookup('template', 'httpd.conf.j2') }}"
httpd-auth.conf: "{{ lookup('template', 'httpd-auth.conf.j2') }}"
httpd-ssi.conf: "{{ lookup('file', 'httpd-ssi.conf') }}"
mime.types: "{{ lookup('file', 'mime.types') }}"
- name: Create a deployment

View File

@ -1,6 +1,7 @@
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so
# Base
<LocationMatch "^/">
AuthType basic
AuthName OpenLDAP
@ -14,6 +15,7 @@ LoadModule ldap_module modules/mod_ldap.so
</RequireAny>
</LocationMatch>
# Users
<LocationMatch "^/eric">
AuthType basic
AuthName OpenLDAP
@ -23,3 +25,14 @@ LoadModule ldap_module modules/mod_ldap.so
AuthLDAPURL "ldap://openldap/dc=eom,dc=dev?uid??(uid=eric)"
Require valid-user
</LocationMatch>
# Git
<LocationMatch "^/.*/git-receive-pack$">
AuthType basic
AuthName OpenLDAP
AuthBasicProvider ldap
AuthLDAPBindDN "cn=admin,dc=eom,dc=dev"
AuthLDAPBindPassword "{{ ldap_admin_password }}"
AuthLDAPURL "ldap://openldap/dc=eom,dc=dev?uid"
Require valid-user
</LocationMatch>