]> granicus.if.org Git - apache/blob - build/mkconfNW.awk
Improve logged information and fix broken doc.
[apache] / build / mkconfNW.awk
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements.  See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License.  You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 BEGIN {
17     
18     A["ServerRoot"] = "SYS:/"BDIR
19     A["Port"] = PORT
20     A["SSLPort"] = SSLPORT
21     A["cgidir"] = "cgi-bin"
22     A["logfiledir"] = "logs"
23     A["htdocsdir"] = "htdocs"
24     A["sysconfdir"] = "conf"
25     A["iconsdir"] = "icons"
26     A["manualdir"] = "manual"
27     A["runtimedir"] = "logs"
28     A["errordir"] = "error"
29     A["proxycachedir"] = "proxy"
30
31     B["htdocsdir"] = A["ServerRoot"]"/"A["htdocsdir"]
32     B["iconsdir"] = A["ServerRoot"]"/"A["iconsdir"]
33     B["manualdir"] = A["ServerRoot"]"/"A["manualdir"]
34     B["errordir"] = A["ServerRoot"]"/"A["errordir"]
35     B["proxycachedir"] = A["ServerRoot"]"/"A["proxycachedir"]
36     B["cgidir"] = A["ServerRoot"]"/"A["cgidir"]
37     B["logfiledir"] = A["logfiledir"]
38     B["sysconfdir"] = A["sysconfdir"]
39     B["runtimedir"] = A["runtimedir"]
40     B["listen_stmt_1"] = "Listen "A["Port"]
41     B["listen_stmt_2"] = ""
42 }
43
44 /@@LoadModule@@/ {
45     print "#LoadModule access_compat_module modules/accesscompat.nlm"
46     print "#LoadModule actions_module modules/actions.nlm"
47     print "#LoadModule auth_basic_module modules/authbasc.nlm"
48     print "#LoadModule auth_digest_module modules/authdigt.nlm"
49     print "#LoadModule authn_anon_module modules/authnano.nlm"
50     print "#LoadModule authn_dbd_module modules/authndbd.nlm"
51     print "#LoadModule authn_dbm_module modules/authndbm.nlm"
52     print "#LoadModule authn_default_module modules/authndef.nlm"
53     print "#LoadModule authn_file_module modules/authnfil.nlm"
54     print "#LoadModule authz_dbd_module modules/authzdbd.nlm"
55     print "#LoadModule authz_dbm_module modules/authzdbm.nlm"
56     print "#LoadModule authz_default_module modules/authzdef.nlm"
57     print "#LoadModule authz_groupfile_module modules/authzgrp.nlm"
58     print "#LoadModule authz_user_module modules/authzusr.nlm"
59     print "#LoadModule authnz_ldap_module modules/authnzldap.nlm"
60     print "#LoadModule ldap_module modules/utilldap.nlm"
61     print "#LoadModule asis_module modules/mod_asis.nlm"
62     print "LoadModule autoindex_module modules/autoindex.nlm"
63     print "#LoadModule cern_meta_module modules/cernmeta.nlm"
64     print "#LoadModule cgi_module modules/mod_cgi.nlm"
65     print "#LoadModule dav_module modules/mod_dav.nlm"
66     print "#LoadModule dav_fs_module modules/moddavfs.nlm"
67     print "#LoadModule dav_lock_module modules/moddavlk.nlm"
68     print "#LoadModule expires_module modules/expires.nlm"
69     print "#LoadModule ext_filter_module modules/extfiltr.nlm"
70     print "#LoadModule file_cache_module modules/filecach.nlm"
71     print "#LoadModule headers_module modules/headers.nlm"
72     print "#LoadModule ident_module modules/modident.nlm"
73     print "#LoadModule imagemap_module modules/imagemap.nlm"
74     print "#LoadModule info_module modules/info.nlm"
75     print "#LoadModule log_forensic_module modules/forensic.nlm"
76     print "#LoadModule logio_module modules/modlogio.nlm"
77     print "#LoadModule mime_magic_module modules/mimemagi.nlm"
78     print "#LoadModule proxy_module modules/proxy.nlm"
79     print "#LoadModule proxy_connect_module modules/proxycon.nlm"
80     print "#LoadModule proxy_http_module modules/proxyhtp.nlm"
81     print "#LoadModule proxy_ftp_module modules/proxyftp.nlm"
82     print "#LoadModule rewrite_module modules/rewrite.nlm"
83     print "#LoadModule speling_module modules/speling.nlm"
84     print "#LoadModule status_module modules/status.nlm"
85     print "#LoadModule unique_id_module modules/uniqueid.nlm"
86     print "#LoadModule usertrack_module modules/usertrk.nlm"
87     print "#LoadModule version_module modules/modversion.nlm"
88     print "#LoadModule userdir_module modules/userdir.nlm"
89     print "#LoadModule vhost_alias_module modules/vhost.nlm"
90     if (MODSSL) {
91        print "#LoadModule ssl_module modules/mod_ssl.nlm"
92     }
93     print ""
94     next
95 }
96
97 match ($0,/443/) {
98     sub(/443/, SSLPORT)
99 }
100
101 match ($0,/^#SSLSessionCache +"dbm:/) {
102     sub(/^#/, "")
103 }
104
105 match ($0,/^SSLSessionCache +"shmcb:/) {
106     sub(/^SSLSessionCache/, "#SSLSessionCache")
107 }
108
109 match ($0,/^SSLMutex +"file:@exp_runtimedir@\/ssl_mutex"/) {
110     sub(/"file:@exp_runtimedir@\/ssl_mutex"/, "default")
111 }
112
113 match ($0,/@@.*@@/) {
114     s=substr($0,RSTART+2,RLENGTH-4)
115     sub(/@@.*@@/,A[s],$0)
116 }
117
118 match ($0,/@rel_.*@/) {
119     s=substr($0,RSTART+5,RLENGTH-6)
120     sub(/@rel_.*@/,A[s],$0)
121 }
122
123 match ($0,/@exp_.*@/) {
124     s=substr($0,RSTART+5,RLENGTH-6)
125     sub(/@exp_.*@/,B[s],$0)
126 }
127
128 match ($0,/@nonssl_.*@/) {
129     s=substr($0,RSTART+8,RLENGTH-9)
130     sub(/@nonssl_.*@/,B[s],$0)
131 }
132
133 {
134     print
135 }
136
137
138 END {
139     if ((ARGV[1] ~ /httpd.conf.in/) && !BSDSKT) { 
140        print ""
141        print "#"
142        print "# SecureListen: Allows you to securely bind Apache to specific IP addresses "
143        print "# and/or ports."
144        print "#"
145        print "# Change this to SecureListen on specific IP addresses as shown below to "
146        print "# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)"
147        print "#"
148        print "#SecureListen "SSLPORT" \"SSL CertificateDNS\""
149        print ""
150     }
151 }