-
Notifications
You must be signed in to change notification settings - Fork 9
/
apache
60 lines (51 loc) · 1.64 KB
/
apache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ldap apache auth
# using pam module
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride FileInfo Options
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
AuthType Basic
AuthPAM_Enabled on
AuthBasicAuthoritative Off
AuthUserFile /dev/null
AuthName "host login"
require valid-user
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Order deny,allow
Deny from all
</Limit>
</Directory>
</IfModule>
# second way
AuthName "bdgn ldap"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPBindDN uid=binduser,ou=bdgn
AuthLDAPBindPassword binderpass
AuthLDAPURL "ldaps://dir1.bdgn.net dir2.bdgn.net/ou=users,o=bdgn?uid?one"
AuthLDAPGroupAttributeIsDN on
Require ldap-group cn=system_all,ou=system,ou=webaccess,o=bdgn # which includes member
#maybe
Require ldap-attribute host=hostname
#permanent redirect
<VirtualHost *:80>
ServerName bekirdogan.net
ServerAlias *.bekirdogan.net
ServerAdmin [email protected]
Redirect permanent / http://bdgn.net/
</VirtualHost>
#reverse proxy
<VirtualHost web-listen:80>
ServerName c.bdgn.com
ServerAlias conf.bdgn.com
ServerAlias config.bdgn.com
RewriteEngine on
RewriteCond %{HTTPS} ^off$
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [NE,R]
</VirtualHost>