Debian Codegraph @

doc/sources/admin/applications/apache.rst

raw
1 Apache HTTP Server
2 ==================
3
4 |image0|
5
6
7 Presentation
8 ------------
9
10 The `Apache HTTP Server <http://httpd.apache.org/>`__ is a free and open-source
11 cross-platform web server software, released under the terms of Apache License
12 2.0.
13
14 It can be used to protect applications and transmit user identity information
15 to them through HTTP headers.
16
17 Apache is highly customizable and can protect applications in many different ways.
18
19
20 Handler
21 -------
22
23 LemonLDAP::NG can be directly integrated into Apache to protect applications using Perl rules.
24
25 The LemonLDAP::NG Handler uses `mod_perl`.
26
27 See the :doc:`Virtual Hosts documentation <../configvhost>` for details.
28
29 mod_auth_mellon
30 ---------------
31
32 You can use `mod_auth_mellon <https://github.com/latchset/mod_auth_mellon>`__ as an alternative to the LemonLDAP::NG handler if you do not want to use `mod_perl`.
33
34 You first need to enable the :doc:`SAML Issuer <../idpsaml>`.
35
36 First, download the metadata file from LemonLDAP::NG ::
37
38 wget -O /etc/apache2/idp-metadata.xml https://auth.example.com/saml/metadata/idp
39
40 Location parameters ::
41
42 <Location /secured>
43 Require valid-user
44 AuthType "Mellon"
45
46 MellonEnable "auth"
47 MellonEndpointPath "/secured/saml"
48 MellonIDPMetadataFile /etc/apache2/idp-metadata.xml
49
50 # Certificate for signing SAML requests
51 MellonSPPrivateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
52 MellonSPCertFile /etc/ssl/certs/ssl-cert-snakeoil.pem
53 </Location>
54
55 You can then obtain the SAML SP metadata at ``https://apache.example.com/secured/saml/metadata``, you need to input it in LemonLDAP::NG when creating the SAML service provider configuration.
56
57 mod_auth_openidc
58 ----------------
59
60 You can use `mod_auth_openidc <https://www.mod-auth-openidc.org/>`__ as an alternative to the LemonLDAP::NG handler if you do not want to use `mod_perl`.
61
62 You first need to enable the :doc:`OpenID Connect Issuer <../idpopenidconnect>`.
63
64 VirtualHosts parameters ::
65
66 # Apache-specific configuration
67 OIDCCryptoPassphrase changeme
68 OIDCRedirectURI https://apache.example.com/secret/oauth2callback
69
70 # URL of LemonLDAP::NG OIDC metadata
71 OIDCProviderMetadataURL https://auth.example.com/.well-known/openid-configuration
72 # Client ID and client secret from LemonLDAP::NG configuration
73 OIDCClientID testrp
74 OIDCClientSecret testrp
75
76 Location parameters ::
77
78 <Location /secured>
79 AuthType openid-connect
80 Require valid-user
81 </Location>
82
83 mod_auth_cas
84 ------------
85
86 You can use `mod_auth_cas <https://github.com/apereo/mod_auth_cas>`__ as an alternative to the LemonLDAP::NG handler if you do not want to use `mod_perl`.
87
88 You first need to enable the :doc:`CAS Issuer <../idpcas>`.
89
90 Global parameters ::
91
92 CASCookiePath /var/cache/apache2/mod_auth_cas/
93 CASLoginURL https://auth.example.com/cas/login
94 CASValidateURL https://auth.example.com/cas/serviceValidate
95
96 VirtualHosts parameters ::
97
98 <Location /secured>
99 Authtype CAS
100 Require valid-user
101 </Location>
102
103
104 .. |image0| image:: /applications/apache.png
105 :class: align-center
106