]> granicus.if.org Git - apache/blob - build/mkconfNW.awk
* Whitespace police
[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     A["ServerRoot"] = "\${SRVROOT}"
18     A["Port"] = PORT
19     A["SSLPort"] = SSLPORT
20     A["cgidir"] = "cgi-bin"
21     A["logfiledir"] = "logs"
22     A["htdocsdir"] = "htdocs"
23     A["sysconfdir"] = "conf"
24     A["iconsdir"] = "icons"
25     A["manualdir"] = "manual"
26     A["runtimedir"] = "logs"
27     A["errordir"] = "error"
28     A["proxycachedir"] = "proxy"
29     A["davlockdb"] = "davlockdb"
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["davlockdb"] = A["ServerRoot"]"/"A["davlockdb"]
37     B["cgidir"] = A["ServerRoot"]"/"A["cgidir"]
38     B["logfiledir"] = A["logfiledir"]
39     B["sysconfdir"] = A["sysconfdir"]
40     B["runtimedir"] = A["runtimedir"]
41 }
42
43 /^ServerRoot / {
44     print "Define SRVROOT \"SYS:/" BDIR "\""
45     print ""
46 }
47 /@@LoadModule@@/ {
48     print "#LoadModule access_compat_module modules/accesscompat.nlm"
49     print "#LoadModule actions_module modules/actions.nlm"
50     print "#LoadModule allowmethods_module modules/allowmethods.nlm"
51     print "#LoadModule auth_basic_module modules/authbasc.nlm"
52     print "#LoadModule auth_digest_module modules/authdigt.nlm"
53     print "#LoadModule authn_anon_module modules/authnano.nlm"
54     print "#LoadModule authn_dbd_module modules/authndbd.nlm"
55     print "#LoadModule authn_dbm_module modules/authndbm.nlm"
56     print "#LoadModule authn_file_module modules/authnfil.nlm"
57     print "#LoadModule authz_dbd_module modules/authzdbd.nlm"
58     print "#LoadModule authz_dbm_module modules/authzdbm.nlm"
59     print "#LoadModule authz_groupfile_module modules/authzgrp.nlm"
60     print "#LoadModule authz_user_module modules/authzusr.nlm"
61     print "#LoadModule authnz_ldap_module modules/authnzldap.nlm"
62     print "#LoadModule ldap_module modules/utilldap.nlm"
63     print "#LoadModule asis_module modules/mod_asis.nlm"
64     print "LoadModule autoindex_module modules/autoindex.nlm"
65     print "#LoadModule buffer_module modules/modbuffer.nlm"
66     print "#LoadModule cern_meta_module modules/cernmeta.nlm"
67     print "LoadModule cgi_module modules/mod_cgi.nlm"
68     print "#LoadModule data_module modules/mod_data.nlm"
69     print "#LoadModule dav_module modules/mod_dav.nlm"
70     print "#LoadModule dav_fs_module modules/moddavfs.nlm"
71     print "#LoadModule dav_lock_module modules/moddavlk.nlm"
72     print "#LoadModule expires_module modules/expires.nlm"
73     print "#LoadModule filter_module modules/mod_filter.nlm"
74     print "#LoadModule ext_filter_module modules/extfiltr.nlm"
75     print "#LoadModule file_cache_module modules/filecach.nlm"
76     print "#LoadModule headers_module modules/headers.nlm"
77     print "#LoadModule ident_module modules/modident.nlm"
78     print "#LoadModule imagemap_module modules/imagemap.nlm"
79     print "#LoadModule info_module modules/info.nlm"
80     print "#LoadModule log_forensic_module modules/forensic.nlm"
81     print "#LoadModule logio_module modules/modlogio.nlm"
82     print "#LoadModule mime_magic_module modules/mimemagi.nlm"
83     print "#LoadModule proxy_module modules/proxy.nlm"
84     print "#LoadModule proxy_connect_module modules/proxycon.nlm"
85     print "#LoadModule proxy_http_module modules/proxyhtp.nlm"
86     print "#LoadModule proxy_ftp_module modules/proxyftp.nlm"
87     print "#LoadModule rewrite_module modules/rewrite.nlm"
88     print "#LoadModule speling_module modules/speling.nlm"
89     print "#LoadModule status_module modules/status.nlm"
90     print "#LoadModule unique_id_module modules/uniqueid.nlm"
91     print "#LoadModule usertrack_module modules/usertrk.nlm"
92     print "#LoadModule version_module modules/modversion.nlm"
93     print "#LoadModule userdir_module modules/userdir.nlm"
94     print "#LoadModule vhost_alias_module modules/vhost.nlm"
95     if (MODSSL) {
96        print "#LoadModule socache_dbm_module modules/socachedbm.nlm"
97        print "#LoadModule socache_shmcb_module modules/socacheshmcb.nlm"
98        print "#LoadModule ssl_module modules/mod_ssl.nlm"
99     }
100     if (MODHTTP2) {
101        print "#LoadModule http2_module modules/mod_http2.nlm"
102        print "#LoadModule proxy_http2_module modules/proxyhttp2.nlm"
103     }
104     print ""
105     next
106 }
107
108 match ($0,/^#SSLSessionCache +"dbm:/) {
109     sub(/^#/, "")
110 }
111
112 match ($0,/^SSLSessionCache +"shmcb:/) {
113     sub(/^SSLSessionCache/, "#SSLSessionCache")
114 }
115
116 match ($0,/^# Mutex +default +file:@rel_runtimedir@/) {
117     sub(/file:@rel_runtimedir@/, "default")
118 }
119
120 match ($0,/@@.*@@/) {
121     s=substr($0,RSTART+2,RLENGTH-4)
122     sub(/@@.*@@/,A[s],$0)
123 }
124
125 match ($0,/@rel_.*@/) {
126     s=substr($0,RSTART+5,RLENGTH-6)
127     sub(/@rel_.*@/,A[s],$0)
128 }
129
130 match ($0,/@exp_.*@/) {
131     s=substr($0,RSTART+5,RLENGTH-6)
132     sub(/@exp_.*@/,B[s],$0)
133 }
134
135 match ($0,/@nonssl_.*@/) {
136     s=substr($0,RSTART+8,RLENGTH-9)
137     sub(/@nonssl_.*@/,B[s],$0)
138 }
139
140 match ($0,/^<IfModule cgid_module>$/) {
141     print "#"
142     print "# CGIMapExtension: Technique for locating the interpreter for CGI scripts."
143     print "# The special interpreter path \"OS\" can be used for NLM CGIs."
144     print "#"
145     print "#CGIMapExtension OS .cgi"
146     print "CGIMapExtension SYS:/perl/Perlcgi/perlcgi.nlm .pl"
147     print ""
148 }
149
150 {
151     print
152 }
153
154 END {
155     if ((ARGV[1] ~ /httpd.conf.in/) && !BSDSKT) {
156        print ""
157        print "#"
158        print "# SecureListen: Allows you to securely bind Apache to specific IP addresses "
159        print "# and/or ports (mod_nwssl)."
160        print "#"
161        print "# Change this to SecureListen on specific IP addresses as shown below to "
162        print "# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)"
163        print "#"
164        print "#SecureListen "SSLPORT" \"SSL CertificateDNS\""
165     }
166     print ""
167 }