forked from andk/pause
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttpsd.conf.pause
397 lines (325 loc) · 9.94 KB
/
httpsd.conf.pause
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# -*- Mode: Cperl; -*-
CoreDumpDirectory /usr/local/apache/cores
ServerTokens ProductOnly
<IfModule noexist.c>
=pod
CPerl-mode now sees POD sections till the first =cut.
</IfModule>
# $Id: httpsd.conf.pause,v 1.40 2002/07/18 21:42:39 k Exp k $
ServerName pause.perl.org
HostnameLookups Off
User nobody
Group www-data
BrowserMatch Mozilla/2 nokeepalive
#ErrorLog logs/error_log
#TransferLog logs/access_log
# LogFormat "%h %l %u %t \"%r\" %s %b %P %T"
LogFormat "%h %l %u %t \"%r\" %s %b %P %p %T \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i"
#PidFile logs/httpd.pid
#ScoreBoardFile logs/apache_status
Timeout 240
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
AddType httpd/send-as-is asis
AddType text/html .shtml
AddHandler server-parsed .shtml
UserDir disabled
UserDir enabled jwied
<IfModule apache_ssl.c>
<IfDefine SWITCH8000>
Port 8443
Listen 8443
SSLCacheServerPort 8112
</IfDefine>
<IfDefine !SWITCH8000>
#Port 443
#Listen 443
SSLCacheServerPort 8111
</IfDefine>
#### solution before cacert: ####
# next two lines may point to nonexisting files, it seems, but must be there
# SSLCACertificatePath /usr/local/ssl/demoCA/
# SSLCACertificateFile /usr/local/ssl/demoCA/ttt.pem
# SSLCertificateFile /home/k/PAUSE/111_sensitive/apache-conf/pause.pem
# SSLCertificateKeyFile /home/k/PAUSE/111_sensitive/apache-conf/pause.pem
#### solution after cacert: ####
# key (two hops) to /home/k/PAUSE/111_sensitive/apache-conf/pause.perl.org-xxx.key
# crt (two hops) to /home/k/PAUSE/111_sensitive/apache-conf/pause.perl.org-xxx.crt
# Then on pause:
# cd /home/k/PAUSE/111_sensitive/apache-conf/
# ln -s -f cacert-class3.crt `openssl x509 -noout -hash < cacert-class3.crt`.0
# ln -s -f cacert-root.crt `openssl x509 -noout -hash < cacert-root.crt`.0
# ln -s -f pause.perl.org-xxx.crt `openssl x509 -noout -hash < pause.perl.org-xxx.crt`.0
SSLCACertificatePath /home/k/pause/apache-conf/
SSLCACertificateFile /home/k/pause/apache-conf/ssl.crt/rapidssl-intermediate.crt
SSLCertificateFile /home/k/pause/apache-conf/ssl.crt/rapidssl.pause.perl.org.crt
SSLCertificateKeyFile /home/k/PAUSE/111_sensitive/apache-conf/pause.perl.org-20080519.key
SSLVerifyClient 0
SSLVerifyDepth 10
SSLFakeBasicAuth
# SSLLogFile /tmp/ssl.log
CustomLog logs/ssl_log "%t %{version}c %{cipher}c %{clientcert}c"
SSLCacheServerPath /usr/local/apache/bin/gcache
<IfDefine SWITCH8000>
SSLCacheServerPort 8112
<VirtualHost _default_:8000>
SSLDisable
</VirtualHost>
</IfDefine>
<IfDefine !SWITCH8000>
SSLCacheServerPort 8111
<VirtualHost _default_:81>
SSLDisable
<Location /ssl-only>
deny from all
</Location>
</VirtualHost>
</IfDefine>
SSLSessionCacheTimeout 360
<IfDefine SWITCH8000>
<VirtualHost _default_:8443>
SSLEnable
</VirtualHost>
</IfDefine>
<IfDefine !SWITCH8000>
<VirtualHost _default_:443>
SSLEnable
</VirtualHost>
</IfDefine>
</IfModule>
#/dev/null !!!
# access.conf
AccessConfig /dev/null
# srm.conf
ResourceConfig /dev/null
DefaultType text/plain
ExtendedStatus On
##############################################
# For all Apache::Registry stuff a common root
##############################################
Alias /perl/ /usr/local/apache/perl/
Alias /incoming /home/ftp/incoming
Alias /pub/PAUSE /home/ftp/pub/PAUSE
##############################################
##############################################
# For bugzilla
##############################################
AddHandler cgi-script .cgi
Alias /bugzilla/ /home/ldachary/webspace/
<Location /bugzilla>
DirectoryIndex index.html
Options Indexes Includes ExecCGI
</Location>
# ScriptAlias /loicdemo/ /home/ldachary/webspace/
#<Location /loicdemo>
# Options +ExecCGI
#</Location>
##############################################
##############################################
# For munin
##############################################
Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
Options None
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310
</IfModule>
</Directory>
##############################################
<IfModule mod_perl.c>
# I believe, this is only for the hardly needed Apache::AuthzDBI in /perl/admin
PerlSetVar Auth_DBI_data_source dbi:mysql:authen_pause
PerlSetVar Auth_DBI_username root
# PerlSetVar Auth_DBI_password
PerlSetVar Auth_DBI_pwd_table usertable
PerlSetVar Auth_DBI_grp_table grouptable
PerlSetVar Auth_DBI_uid_field user
PerlSetVar Auth_DBI_grp_field ugroup
PerlSetVar Auth_DBI_pwd_field password
PerlSetupEnv Off
PerlSetVar ReloadAll Off
PerlSetVar ReloadDebug Off
PerlSetVar ReloadModules "pause_1999::config \
pause_1999::authen_user \
pause_1999::edit \
pause_1999::layout \
pause_1999::main \
pause_1999::message \
pause_1999::speedlinkgif \
pause_1999::startform \
pause_1999::userstatus \
PAUSE \
PrivatePAUSE \
"
<Perl>
=head2 SEE ME
A lone cut _starts_ pod
CPerl-mode sees perl code after this =cut.
I don't understand those indents, but they do no harm anyway...
=cut
#!perl
BEGIN {
push @INC, "/home/k/PAUSE/lib";
}
# $debugging
my $debugging;
if (Apache->define("PERL_DEBUG")) {
$debugging = 1;
require Apache::DB;
require 'Apache/perl5db.pl'; # this seems to be needed with
# 5.7.2@@14159, otherwise we get "No
# DB::DB routine defined at
# /usr/local/apache/lib/map_box/registry.pm
# line 3."
Apache::DB->init;
}
use strict;
use vars qw(
$AccessConfig
$BindAddress
$DefaultType
$DocumentRoot
$ErrorLog
$KeepAlive
$LanguagePriority
$Listen
$MaxClients
$MaxRequestsPerChild
$MaxSpareServers
$MinSpareServers
$PassEnv
$PerlChildInitHandler
$PerlPostReadRequestHandler
$PerlSetEnv
$PerlWarn
$PidFile
$Port
$ResourceConfig
$ScoreBoardFile
$ServerAdmin
$ServerRoot
$ServerType
$StartServers
$TransferLog
%Directory
%Location
@Alias
@ScriptAlias
@PerlSetEnv
);
# $Location{"/"}{PerlSetupEnv} = "On";
$ServerRoot = "/usr/local/apache";
$DocumentRoot = "/usr/local/apache/htdocs";
$ServerType = "standalone";
$PerlWarn = "On";
my $SWITCH8000 = Apache->define("SWITCH8000");
my $ext = $SWITCH8000 ? ".8000" : "";
$ErrorLog = "logs/error_log$ext";
$TransferLog = "logs/access_log$ext";
$PidFile = "logs/httpd.pid$ext";
$ScoreBoardFile = "logs/apache_status$ext";
my $ord_port = $SWITCH8000 ? 8000 : 81; # must change also: _default_:81 above
$Port = $ord_port;
$Listen = $ord_port;
$BindAddress = undef;
# require CGI;
use BSD::Resource ();
Apache->push_handlers(PerlChildInitHandler => sub {
#BSD::Resource::setrlimit(BSD::Resource::RLIMIT_CPU(),
# 60*10, 60*10);
#BSD::Resource::setrlimit(BSD::Resource::RLIMIT_DATA(),
# 40*1024*1024, 40*1024*1024);
BSD::Resource::setrlimit(BSD::Resource::RLIMIT_CORE(),
40*1024*1024, 40*1024*1024);
});
for my $loc (qw( /status )){
$Location{$loc}{SetHandler} = "server-status";
}
for my $loc (qw( /server-info )){
$Location{$loc}{SetHandler} = "server-info";
}
my $pause = "/pause";
if (1) { # /pause/ directory
require pause_1999::main;
if (-f "/etc/PAUSE.CLOSED") {
my $loc = "/";
$Location{$loc}{SetHandler} = "perl-script";
$Location{$loc}{Options} = "ExecCGI";
$Location{$loc}{PerlHandler} = "perl_pause::disabled2";
} else {
for my $loc ($pause){
require pause_1999::fixup;
$Location{$loc}{PerlFixupHandler} = "pause_1999::fixup";
}
$Location{"/"}{PerlFixupHandler} = "pause_1999::index";
for my $loc ("$pause/query", "$pause/authenquery", "$pause/mimequery"){
# note: mimequery is experimental and will go away again
if ($debugging) {
$Location{$loc}{PerlFixupHandler} = "Apache::DB";
}
require pause_1999::config;
$Location{$loc}{SetHandler} = "perl-script";
$Location{$loc}{PerlHandler} = "pause_1999::config";
}
for my $loc (
"$pause/authenquery",
"$pause/mimequery",
"/perl/user",
"/perl/admin",
"/pub",
"/status",
"/server-info",
"/munin",
){
$Location{$loc}{PerlAuthenHandler} = "pause_1999::authen_user";
$Location{$loc}{AuthName} = "PAUSE";
$Location{$loc}{AuthType} = "Basic";
$Location{$loc}{require} = "valid-user";
}
$Location{"/perl/admin"}{PerlAuthzHandler} = "Apache::AuthzDBI";
$Location{"/perl/admin"}{require} = ["group", "admin"];
}
}
for my $loc ( "/perl" ){
$Location{$loc}{SetHandler} = "perl-script";
$Location{$loc}{Options} = "ExecCGI";
if (-f "/etc/PAUSE.CLOSED") {
$Location{$loc}{PerlHandler} = "perl_pause::disabled2";
} else {
$Location{$loc}{PerlHandler} = "Apache::Registry";
}
}
for my $loc (qw(/pub /incoming)){
$Location{$loc}{IndexOptions} = "FancyIndexing NameWidth=* SuppressDescription";
}
$MinSpareServers = 4;
$MaxSpareServers = 12;
$StartServers = 4;
$MaxClients = 12;
if (Apache->define("ONE_PROCESS")) {
$MaxRequestsPerChild = 1; # 1: I want to see the SEGV
} else {
$MaxRequestsPerChild = 100; # set to 0 as long as it turns off the SEGV
}
if ($SWITCH8000) {
$MinSpareServers =
$MaxSpareServers =
$StartServers =
$MaxClients = 2;
$KeepAlive = "Off";
$MaxRequestsPerChild = 0;
}
$ServerAdmin = '[email protected]';
if (1){
for my $loc (qw( /pause )){
$Location{$loc}{PerlInitHandler} = "Apache::Reload";
}
}
__END__
</Perl>
</IfModule>
<IfModule noexist.c>
=cut
</IfModule>