-
Notifications
You must be signed in to change notification settings - Fork 2
/
apache-vhost-sample.conf
331 lines (325 loc) · 14.2 KB
/
apache-vhost-sample.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName toolkit.l-a.site
ServerAdmin support@l-a.site
DocumentRoot /var/www/html/
<Directory />
Require all granted
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests Off
ProxyPreserveHost On
ProxyVia full
RewriteCond %{REQUEST_URI} ^/ttyd(\d+) [NC]
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
# Change 172.16.0.1 with your real internal IP
ProxyPass /ttyd2011/ws ws://172.16.0.1:2011/ws
ProxyPass /ttyd2011 http://172.16.0.1:2011
ProxyPassReverse /ttyd2011 http://172.16.0.1:2011
ProxyPass /ttyd2012/ws ws://172.16.0.1:2012/ws
ProxyPass /ttyd2012 http://172.16.0.1:2012
ProxyPassReverse /ttyd2012 http://172.16.0.1:2012
ProxyPass /ttyd2013/ws ws://172.16.0.1:2013/ws
ProxyPass /ttyd2013 http://172.16.0.1:2013
ProxyPassReverse /ttyd2013 http://172.16.0.1:2013
ProxyPass /ttyd2014/ws ws://172.16.0.1:2014/ws
ProxyPass /ttyd2014 http://172.16.0.1:2014
ProxyPassReverse /ttyd2014 http://172.16.0.1:2014
ProxyPass /ttyd2015/ws ws://172.16.0.1:2015/ws
ProxyPass /ttyd2015 http://172.16.0.1:2015
ProxyPassReverse /ttyd2015 http://172.16.0.1:2015
ProxyPass /ttyd2016/ws ws://172.16.0.1:2016/ws
ProxyPass /ttyd2016 http://172.16.0.1:2016
ProxyPassReverse /ttyd2016 http://172.16.0.1:2016
ProxyPass /ttyd2017/ws ws://172.16.0.1:2017/ws
ProxyPass /ttyd2017 http://172.16.0.1:2017
ProxyPassReverse /ttyd2017 http://172.16.0.1:2017
ProxyPass /ttyd2018/ws ws://172.16.0.1:2018/ws
ProxyPass /ttyd2018 http://172.16.0.1:2018
ProxyPassReverse /ttyd2018 http://172.16.0.1:2018
ProxyPass /ttyd2019/ws ws://172.16.0.1:2019/ws
ProxyPass /ttyd2019 http://172.16.0.1:2019
ProxyPassReverse /ttyd2019 http://172.16.0.1:2019
ProxyPass /ttyd2020/ws ws://172.16.0.1:2020/ws
ProxyPass /ttyd2020 http://172.16.0.1:2020
ProxyPassReverse /ttyd2020 http://172.16.0.1:2020
ProxyPass /ttyd2021/ws ws://172.16.0.1:2021/ws
ProxyPass /ttyd2021 http://172.16.0.1:2021
ProxyPassReverse /ttyd2021 http://172.16.0.1:2021
ProxyPass /ttyd2022/ws ws://172.16.0.1:2022/ws
ProxyPass /ttyd2022 http://172.16.0.1:2022
ProxyPassReverse /ttyd2022 http://172.16.0.1:2022
ProxyPass /ttyd2023/ws ws://172.16.0.1:2023/ws
ProxyPass /ttyd2023 http://172.16.0.1:2023
ProxyPassReverse /ttyd2023 http://172.16.0.1:2023
ProxyPass /ttyd2024/ws ws://172.16.0.1:2024/ws
ProxyPass /ttyd2024 http://172.16.0.1:2024
ProxyPassReverse /ttyd2024 http://172.16.0.1:2024
ProxyPass /ttyd2025/ws ws://172.16.0.1:2025/ws
ProxyPass /ttyd2025 http://172.16.0.1:2025
ProxyPassReverse /ttyd2025 http://172.16.0.1:2025
ProxyPass /ttyd2026/ws ws://172.16.0.1:2026/ws
ProxyPass /ttyd2026 http://172.16.0.1:2026
ProxyPassReverse /ttyd2026 http://172.16.0.1:2026
ProxyPass /ttyd2027/ws ws://172.16.0.1:2027/ws
ProxyPass /ttyd2027 http://172.16.0.1:2027
ProxyPassReverse /ttyd2027 http://172.16.0.1:2027
ProxyPass /ttyd2028/ws ws://172.16.0.1:2028/ws
ProxyPass /ttyd2028 http://172.16.0.1:2028
ProxyPassReverse /ttyd2028 http://172.16.0.1:2028
ProxyPass /ttyd2029/ws ws://172.16.0.1:2029/ws
ProxyPass /ttyd2029 http://172.16.0.1:2029
ProxyPassReverse /ttyd2029 http://172.16.0.1:2029
ProxyPass /ttyd2030/ws ws://172.16.0.1:2030/ws
ProxyPass /ttyd2030 http://172.16.0.1:2030
ProxyPassReverse /ttyd2030 http://172.16.0.1:2030
ProxyPass /ttyd2031/ws ws://172.16.0.1:2031/ws
ProxyPass /ttyd2031 http://172.16.0.1:2031
ProxyPassReverse /ttyd2031 http://172.16.0.1:2031
ProxyPass /ttyd2032/ws ws://172.16.0.1:2032/ws
ProxyPass /ttyd2032 http://172.16.0.1:2032
ProxyPassReverse /ttyd2032 http://172.16.0.1:2032
ProxyPass /ttyd2033/ws ws://172.16.0.1:2033/ws
ProxyPass /ttyd2033 http://172.16.0.1:2033
ProxyPassReverse /ttyd2033 http://172.16.0.1:2033
ProxyPass /ttyd2034/ws ws://172.16.0.1:2034/ws
ProxyPass /ttyd2034 http://172.16.0.1:2034
ProxyPassReverse /ttyd2034 http://172.16.0.1:2034
ProxyPass /ttyd2035/ws ws://172.16.0.1:2035/ws
ProxyPass /ttyd2035 http://172.16.0.1:2035
ProxyPassReverse /ttyd2035 http://172.16.0.1:2035
ProxyPass /ttyd2036/ws ws://172.16.0.1:2036/ws
ProxyPass /ttyd2036 http://172.16.0.1:2036
ProxyPassReverse /ttyd2036 http://172.16.0.1:2036
ProxyPass /ttyd2037/ws ws://172.16.0.1:2037/ws
ProxyPass /ttyd2037 http://172.16.0.1:2037
ProxyPassReverse /ttyd2037 http://172.16.0.1:2037
ProxyPass /ttyd2038/ws ws://172.16.0.1:2038/ws
ProxyPass /ttyd2038 http://172.16.0.1:2038
ProxyPassReverse /ttyd2038 http://172.16.0.1:2038
ProxyPass /ttyd2039/ws ws://172.16.0.1:2039/ws
ProxyPass /ttyd2039 http://172.16.0.1:2039
ProxyPassReverse /ttyd2039 http://172.16.0.1:2039
ProxyPass /ttyd2040/ws ws://172.16.0.1:2040/ws
ProxyPass /ttyd2040 http://172.16.0.1:2040
ProxyPassReverse /ttyd2040 http://172.16.0.1:2040
ProxyPass /ttyd2041/ws ws://172.16.0.1:2041/ws
ProxyPass /ttyd2041 http://172.16.0.1:2041
ProxyPassReverse /ttyd2041 http://172.16.0.1:2041
ProxyPass /ttyd2042/ws ws://172.16.0.1:2042/ws
ProxyPass /ttyd2042 http://172.16.0.1:2042
ProxyPassReverse /ttyd2042 http://172.16.0.1:2042
ProxyPass /ttyd2043/ws ws://172.16.0.1:2043/ws
ProxyPass /ttyd2043 http://172.16.0.1:2043
ProxyPassReverse /ttyd2043 http://172.16.0.1:2043
ProxyPass /ttyd2044/ws ws://172.16.0.1:2044/ws
ProxyPass /ttyd2044 http://172.16.0.1:2044
ProxyPassReverse /ttyd2044 http://172.16.0.1:2044
ProxyPass /ttyd2045/ws ws://172.16.0.1:2045/ws
ProxyPass /ttyd2045 http://172.16.0.1:2045
ProxyPassReverse /ttyd2045 http://172.16.0.1:2045
ProxyPass /ttyd2046/ws ws://172.16.0.1:2046/ws
ProxyPass /ttyd2046 http://172.16.0.1:2046
ProxyPassReverse /ttyd2046 http://172.16.0.1:2046
ProxyPass /ttyd2047/ws ws://172.16.0.1:2047/ws
ProxyPass /ttyd2047 http://172.16.0.1:2047
ProxyPassReverse /ttyd2047 http://172.16.0.1:2047
ProxyPass /ttyd2048/ws ws://172.16.0.1:2048/ws
ProxyPass /ttyd2048 http://172.16.0.1:2048
ProxyPassReverse /ttyd2048 http://172.16.0.1:2048
ProxyPass /ttyd2049/ws ws://172.16.0.1:2049/ws
ProxyPass /ttyd2049 http://172.16.0.1:2049
ProxyPassReverse /ttyd2049 http://172.16.0.1:2049
ProxyPass /ttyd2050/ws ws://172.16.0.1:2050/ws
ProxyPass /ttyd2050 http://172.16.0.1:2050
ProxyPassReverse /ttyd2050 http://172.16.0.1:2050
ProxyPass /ttyd2051/ws ws://172.16.0.1:2051/ws
ProxyPass /ttyd2051 http://172.16.0.1:2051
ProxyPassReverse /ttyd2051 http://172.16.0.1:2051
ProxyPass /ttyd2052/ws ws://172.16.0.1:2052/ws
ProxyPass /ttyd2052 http://172.16.0.1:2052
ProxyPassReverse /ttyd2052 http://172.16.0.1:2052
ProxyPass /ttyd2053/ws ws://172.16.0.1:2053/ws
ProxyPass /ttyd2053 http://172.16.0.1:2053
ProxyPassReverse /ttyd2053 http://172.16.0.1:2053
ProxyPass /ttyd2054/ws ws://172.16.0.1:2054/ws
ProxyPass /ttyd2054 http://172.16.0.1:2054
ProxyPassReverse /ttyd2054 http://172.16.0.1:2054
ProxyPass /ttyd2055/ws ws://172.16.0.1:2055/ws
ProxyPass /ttyd2055 http://172.16.0.1:2055
ProxyPassReverse /ttyd2055 http://172.16.0.1:2055
ProxyPass /ttyd2056/ws ws://172.16.0.1:2056/ws
ProxyPass /ttyd2056 http://172.16.0.1:2056
ProxyPassReverse /ttyd2056 http://172.16.0.1:2056
ProxyPass /ttyd2057/ws ws://172.16.0.1:2057/ws
ProxyPass /ttyd2057 http://172.16.0.1:2057
ProxyPassReverse /ttyd2057 http://172.16.0.1:2057
ProxyPass /ttyd2058/ws ws://172.16.0.1:2058/ws
ProxyPass /ttyd2058 http://172.16.0.1:2058
ProxyPassReverse /ttyd2058 http://172.16.0.1:2058
ProxyPass /ttyd2059/ws ws://172.16.0.1:2059/ws
ProxyPass /ttyd2059 http://172.16.0.1:2059
ProxyPassReverse /ttyd2059 http://172.16.0.1:2059
ProxyPass /ttyd2060/ws ws://172.16.0.1:2060/ws
ProxyPass /ttyd2060 http://172.16.0.1:2060
ProxyPassReverse /ttyd2060 http://172.16.0.1:2060
ProxyPass /ttyd2061/ws ws://172.16.0.1:2061/ws
ProxyPass /ttyd2061 http://172.16.0.1:2061
ProxyPassReverse /ttyd2061 http://172.16.0.1:2061
ProxyPass /ttyd2062/ws ws://172.16.0.1:2062/ws
ProxyPass /ttyd2062 http://172.16.0.1:2062
ProxyPassReverse /ttyd2062 http://172.16.0.1:2062
ProxyPass /ttyd2063/ws ws://172.16.0.1:2063/ws
ProxyPass /ttyd2063 http://172.16.0.1:2063
ProxyPassReverse /ttyd2063 http://172.16.0.1:2063
ProxyPass /ttyd2064/ws ws://172.16.0.1:2064/ws
ProxyPass /ttyd2064 http://172.16.0.1:2064
ProxyPassReverse /ttyd2064 http://172.16.0.1:2064
ProxyPass /ttyd2065/ws ws://172.16.0.1:2065/ws
ProxyPass /ttyd2065 http://172.16.0.1:2065
ProxyPassReverse /ttyd2065 http://172.16.0.1:2065
ProxyPass /ttyd2066/ws ws://172.16.0.1:2066/ws
ProxyPass /ttyd2066 http://172.16.0.1:2066
ProxyPassReverse /ttyd2066 http://172.16.0.1:2066
ProxyPass /ttyd2067/ws ws://172.16.0.1:2067/ws
ProxyPass /ttyd2067 http://172.16.0.1:2067
ProxyPassReverse /ttyd2067 http://172.16.0.1:2067
ProxyPass /ttyd2068/ws ws://172.16.0.1:2068/ws
ProxyPass /ttyd2068 http://172.16.0.1:2068
ProxyPassReverse /ttyd2068 http://172.16.0.1:2068
ProxyPass /ttyd2069/ws ws://172.16.0.1:2069/ws
ProxyPass /ttyd2069 http://172.16.0.1:2069
ProxyPassReverse /ttyd2069 http://172.16.0.1:2069
ProxyPass /ttyd2070/ws ws://172.16.0.1:2070/ws
ProxyPass /ttyd2070 http://172.16.0.1:2070
ProxyPassReverse /ttyd2070 http://172.16.0.1:2070
ProxyPass /ttyd2071/ws ws://172.16.0.1:2071/ws
ProxyPass /ttyd2071 http://172.16.0.1:2071
ProxyPassReverse /ttyd2071 http://172.16.0.1:2071
ProxyPass /ttyd2072/ws ws://172.16.0.1:2072/ws
ProxyPass /ttyd2072 http://172.16.0.1:2072
ProxyPassReverse /ttyd2072 http://172.16.0.1:2072
ProxyPass /ttyd2073/ws ws://172.16.0.1:2073/ws
ProxyPass /ttyd2073 http://172.16.0.1:2073
ProxyPassReverse /ttyd2073 http://172.16.0.1:2073
ProxyPass /ttyd2074/ws ws://172.16.0.1:2074/ws
ProxyPass /ttyd2074 http://172.16.0.1:2074
ProxyPassReverse /ttyd2074 http://172.16.0.1:2074
ProxyPass /ttyd2075/ws ws://172.16.0.1:2075/ws
ProxyPass /ttyd2075 http://172.16.0.1:2075
ProxyPassReverse /ttyd2075 http://172.16.0.1:2075
ProxyPass /ttyd2076/ws ws://172.16.0.1:2076/ws
ProxyPass /ttyd2076 http://172.16.0.1:2076
ProxyPassReverse /ttyd2076 http://172.16.0.1:2076
ProxyPass /ttyd2077/ws ws://172.16.0.1:2077/ws
ProxyPass /ttyd2077 http://172.16.0.1:2077
ProxyPassReverse /ttyd2077 http://172.16.0.1:2077
ProxyPass /ttyd2078/ws ws://172.16.0.1:2078/ws
ProxyPass /ttyd2078 http://172.16.0.1:2078
ProxyPassReverse /ttyd2078 http://172.16.0.1:2078
ProxyPass /ttyd2079/ws ws://172.16.0.1:2079/ws
ProxyPass /ttyd2079 http://172.16.0.1:2079
ProxyPassReverse /ttyd2079 http://172.16.0.1:2079
ProxyPass /ttyd2080/ws ws://172.16.0.1:2080/ws
ProxyPass /ttyd2080 http://172.16.0.1:2080
ProxyPassReverse /ttyd2080 http://172.16.0.1:2080
ProxyPass /ttyd2081/ws ws://172.16.0.1:2081/ws
ProxyPass /ttyd2081 http://172.16.0.1:2081
ProxyPassReverse /ttyd2081 http://172.16.0.1:2081
ProxyPass /ttyd2082/ws ws://172.16.0.1:2082/ws
ProxyPass /ttyd2082 http://172.16.0.1:2082
ProxyPassReverse /ttyd2082 http://172.16.0.1:2082
ProxyPass /ttyd2083/ws ws://172.16.0.1:2083/ws
ProxyPass /ttyd2083 http://172.16.0.1:2083
ProxyPassReverse /ttyd2083 http://172.16.0.1:2083
ProxyPass /ttyd2084/ws ws://172.16.0.1:2084/ws
ProxyPass /ttyd2084 http://172.16.0.1:2084
ProxyPassReverse /ttyd2084 http://172.16.0.1:2084
ProxyPass /ttyd2085/ws ws://172.16.0.1:2085/ws
ProxyPass /ttyd2085 http://172.16.0.1:2085
ProxyPassReverse /ttyd2085 http://172.16.0.1:2085
ProxyPass /ttyd2086/ws ws://172.16.0.1:2086/ws
ProxyPass /ttyd2086 http://172.16.0.1:2086
ProxyPassReverse /ttyd2086 http://172.16.0.1:2086
ProxyPass /ttyd2087/ws ws://172.16.0.1:2087/ws
ProxyPass /ttyd2087 http://172.16.0.1:2087
ProxyPassReverse /ttyd2087 http://172.16.0.1:2087
ProxyPass /ttyd2088/ws ws://172.16.0.1:2088/ws
ProxyPass /ttyd2088 http://172.16.0.1:2088
ProxyPassReverse /ttyd2088 http://172.16.0.1:2088
ProxyPass /ttyd2089/ws ws://172.16.0.1:2089/ws
ProxyPass /ttyd2089 http://172.16.0.1:2089
ProxyPassReverse /ttyd2089 http://172.16.0.1:2089
ProxyPass /ttyd2090/ws ws://172.16.0.1:2090/ws
ProxyPass /ttyd2090 http://172.16.0.1:2090
ProxyPassReverse /ttyd2090 http://172.16.0.1:2090
ProxyPass /ttyd2091/ws ws://172.16.0.1:2091/ws
ProxyPass /ttyd2091 http://172.16.0.1:2091
ProxyPassReverse /ttyd2091 http://172.16.0.1:2091
ProxyPass /ttyd2092/ws ws://172.16.0.1:2092/ws
ProxyPass /ttyd2092 http://172.16.0.1:2092
ProxyPassReverse /ttyd2092 http://172.16.0.1:2092
ProxyPass /ttyd2093/ws ws://172.16.0.1:2093/ws
ProxyPass /ttyd2093 http://172.16.0.1:2093
ProxyPassReverse /ttyd2093 http://172.16.0.1:2093
ProxyPass /ttyd2094/ws ws://172.16.0.1:2094/ws
ProxyPass /ttyd2094 http://172.16.0.1:2094
ProxyPassReverse /ttyd2094 http://172.16.0.1:2094
ProxyPass /ttyd2095/ws ws://172.16.0.1:2095/ws
ProxyPass /ttyd2095 http://172.16.0.1:2095
ProxyPassReverse /ttyd2095 http://172.16.0.1:2095
ProxyPass /ttyd2096/ws ws://172.16.0.1:2096/ws
ProxyPass /ttyd2096 http://172.16.0.1:2096
ProxyPassReverse /ttyd2096 http://172.16.0.1:2096
ProxyPass /ttyd2097/ws ws://172.16.0.1:2097/ws
ProxyPass /ttyd2097 http://172.16.0.1:2097
ProxyPassReverse /ttyd2097 http://172.16.0.1:2097
ProxyPass /ttyd2098/ws ws://172.16.0.1:2098/ws
ProxyPass /ttyd2098 http://172.16.0.1:2098
ProxyPassReverse /ttyd2098 http://172.16.0.1:2098
ProxyPass /ttyd2099/ws ws://172.16.0.1:2099/ws
ProxyPass /ttyd2099 http://172.16.0.1:2099
ProxyPassReverse /ttyd2099 http://172.16.0.1:2099
ProxyPass /ttyd2100/ws ws://172.16.0.1:2100/ws
ProxyPass /ttyd2100 http://172.16.0.1:2100
ProxyPassReverse /ttyd2100 http://172.16.0.1:2100
# Root
ProxyPass "/" "http://172.16.0.1:2010/" timeout=600
ProxyPassReverse "/" "http://172.16.0.1:2010/"
RewriteEngine On
# https://stackoverflow.com/questions/36472920/apache-proxy-configuration-for-socket-io-project-not-in-root
# websocket
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://172.16.0.1:2010/$1 [P,L]
ProxyPass /socket.io http://172.16.0.1:2010/socket.io
ProxyPassReverse /socket.io http://172.16.0.1:2010/socket.io
<Location />
AuthType Basic
AuthName "Authentication Required"
AuthUserFile /etc/apache2/passwdfile.toolkit
<RequireAny>
Require env noauth
Require env REDIRECT_noauth
Require valid-user
</RequireAny>
</Location>
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.
# RewriteCond %{SERVER_NAME} =toolkit.l-a.site [OR]
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
SSLCertificateFile /etc/letsencrypt/live/toolkit.l-a.site/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/toolkit.l-a.site/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>