apache.conf.in: use @@certsdir@@ not @@webroot@@/../certs
[girocco.git] / apache.conf.in
blob34173dd2a3de9ae2a7942792d7f6722fb409d9fc
1 ##  To convert this file to apache.conf using the current Girocco::Config
2 ##  values either do "make" or "make apache.conf" or ./make-apache-conf.sh
3 ##
4 # This is an example configuration of a virtualhost running Girocco, as set up
5 # at repo.or.cz; unfortunately, somewhat independent from Girocco::Config.
6 # It is not essential for Girocco to use a special virtualhost, however.
7 <VirtualHost *:80>
8         <IfModule rewrite_module>
9                 RewriteEngine on
10                 RewriteCond %{SERVER_NAME} !=@@httpdnsname@@
11                 RewriteRule ^ http://@@httpdnsname@@%{REQUEST_URI} [L,NE,R=301]
12         <IfDefine @@TLSHost@@>
13                 RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
14                 RewriteCond %{SERVER_NAME} =@@httpdnsname@@
15                 RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,NE,R=301]
16         </IfDefine>
17         </IfModule>
19         Alias /.well-known/acme-challenge/ @@certsdir@@/acme/.well-known/acme-challenge/
20         <Directory "@@certsdir@@/acme/.well-known/acme-challenge/">
21                 Options None
22                 AllowOverride None
23                 ForceType text/plain
24                 <IfVersion < 2.3>
25                 Order allow,deny
26                 Allow from all
27                 Satisfy all
28                 </IfVersion>
29                 <IfVersion >= 2.3>
30                 Require all granted
31                 </IfVersion>
32         </Directory>
34 # ---- BEGIN LINES TO DUPLICATE ----
36         ServerName @@httpdnsname@@
37         ServerAlias www.@@httpdnsname@@
38         ServerAdmin @@admin@@
40         # This is the standard "combined" log format modified as follows:
41         #    the REMOTE_USER (%u) has double-quotes around it
42         #    the received time is shown as [YYYY-mm-dd_HH:MM:SS +hhmm] (almost RFC 3339 format)
43         #        -- this is one character shorter than the default but sorts so much better
44         #    when the logio_module is present (almost always) the %O value is prefixed with:
45         #        %I->  -- <bytes-received-including-request-and-headers>
46         #    the first line of the request ("%r") is prefixed with
47         #        %X%k: -- <connection-status><keepalive-request-num>
48         #                 <keepalive-request-num> will be omitted if apache < 2.2.11
49         #    these fields are added to the end:
50         #        :%{local}p   -- :<actual-server-port>
51         #        %Dus         -- <request-time-in-microseconds>
52         #        "%o{Content-Range}" -- <outgoing Content-Range header>
53         <IfVersion >= 2.2.11>
54         LogFormat "%h %l \"%u\" %{[%F_%T %z]}t %X%k:\"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" :%{local}p %Dus \"%{Content-Range}o\"" girocco
55         </IfVersion>
56         <IfVersion !>= 2.2.11>
57         LogFormat "%h %l \"%u\" %{[%F_%T %z]}t %X:\"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" :%{local}p %Dus \"%{Content-Range}o\"" girocco
58         </IfVersion>
59         <IfModule logio_module>
60                 # %I and %O are only available with the logio_module
61                 <IfVersion >= 2.2.11>
62                 LogFormat "%h %l \"%u\" %{[%F_%T %z]}t %X%k:\"%r\" %>s %I->%O \"%{Referer}i\" \"%{User-Agent}i\" :%{local}p %Dus \"%{Content-Range}o\"" girocco
63                 </IfVersion>
64                 <IfVersion !>= 2.2.11>
65                 LogFormat "%h %l \"%u\" %{[%F_%T %z]}t %X:\"%r\" %>s %I->%O \"%{Referer}i\" \"%{User-Agent}i\" :%{local}p %Dus \"%{Content-Range}o\"" girocco
66                 </IfVersion>
67         </IfModule>
69         # If your distribution does not set APACHE_LOG_DIR before
70         # starting Apache you will need to edit the next two directives
71         ErrorLog "/var/log/apache2/repo-error.log"
72         CustomLog "/var/log/apache2/repo-access.log" girocco
74         <IfModule mime_magic_module>
75                 # Avoid spurious Content-Type values when git-http-backend
76                 # fails to provide a Content-Type header in its output
77                 MimeMagicFile /dev/null
78         </IfModule>
80         DocumentRoot @@webroot@@
81         <Directory @@webroot@@>
82                 # Add MultiViews only if pages are truly
83                 # offered in more than a single language
84                 # FollowSymLinks or SymLinksIfOwnerMatch is required for .htaccess files
85                 Options FollowSymLinks
86                 # FileInfo (or All) must be enabled to activate .htaccess file mod_rewrite rules
87                 AllowOverride All
88                 <IfVersion < 2.3>
89                 Order allow,deny
90                 Allow from all
91                 Satisfy all
92                 </IfVersion>
93                 <IfVersion >= 2.3>
94                 Require all granted
95                 </IfVersion>
96                 DirectoryIndex w
97         </Directory>
99         # The non-mod_rewrite items are handled first where the magic /[bchrw]
100         # prefix always forces selection of the prefix-indicated cgi handler.
102         ScriptAlias /w @@cgiroot@@/gitweb.cgi
103         ScriptAlias /b @@cgiroot@@/bundles.cgi
104         ScriptAlias /h @@cgiroot@@/html.cgi
105         ScriptAliasMatch ^/(?!(?i)gitweb\.cgi|bundles\.cgi|html\.cgi(?:/|$))([^/]+\.cgi(?:/.*)?)$ @@cgiroot@@/$1
107         # Any requests without the magic /[bchrw] are treated as Git requests if they
108         # are one of the few possible Git URLs otherwise they go to bundles or gitweb
110         # Change the setting of $SmartHTTPOnly in Girocco::Config.pm to
111         # change whether or not non-smart HTTP fetch access will be allowed.
113         <IfDefine !@@SmartHTTPOnly@@>
114         # This accelerates non-smart HTTP access to loose objects, packs and info
115         AliasMatch \
116                 "(?x)^/(?![bchw]/)(?:r/)? \
117                 ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?)(?:\.git)?/( \
118                         HEAD | \
119                         objects/info/alternates | \
120                         objects/info/http-alternates | \
121                         objects/info/packs | \
122                         objects/[0-9a-f]{2}/[0-9a-f]{38} | \
123                         objects/pack/pack-[0-9a-f]{40}\.(?:pack|idx) )$" \
124                 @@reporoot@@/$1.git/$2
125         </IfDefine>
127         # SetEnv GIT_HTTP_BACKEND_BIN to override Config.pm $git_http_backend_bin
128         ScriptAlias /r/ @@basedir@@/bin/git-http-backend-verify/
130         ScriptAliasMatch \
131                 "(?x)^/(?![bchrw]/) \
132                 ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?)(?:\.git)?/( \
133                         info/refs | \
134                         git-upload-pack | \
135                         git-receive-pack | \
136                         [a-zA-Z0-9][a-zA-Z0-9+._-]*\.bundle )$" \
137                 @@basedir@@/bin/git-http-backend-verify/$1.git/$2
139         # Everything else off to bundles.cgi or gitweb.cgi
140         ScriptAliasMatch \
141                 "(?x)^/(?![bchrw]/) \
142                 ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?\.git/bundles)$" \
143                 @@cgiroot@@/bundles.cgi/$1
144         ScriptAliasMatch \
145                 "(?x)^/(?![bchrw]/) \
146                 ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?\.git(?!/bundles)(?:/.*)?)$" \
147                 @@cgiroot@@/gitweb.cgi/$1
149         # mod_rewrite is not strictly required for gitweb and fetch access, but
150         # if it's not available the trailing ".git" is never optional for
151         # gitweb, the leading /h is always required for *.html, snapshots are
152         # not throttled, some bogus Git http protocol requests will not be
153         # detected early and, if non-smart HTTP is allowed, access to the
154         # /info/refs file will not be accelerated in non-smart HTTP mode.
156         <IfModule rewrite_module>
157                 RewriteEngine On
159                 # Snapshot requests are only allowed via the PATH_INFO mechanism
160                 RewriteCond %{QUERY_STRING}     (^|[&;])a=snapshot([&;]|$) [NC]
161                 RewriteRule .? - [NS,F,L]
163                 # Redirect snapshot requests to snapshot.cgi
164                 RewriteRule \
165                         "(?x)^/(?![bchr]/)(?:w/)? \
166                         ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?\.git/ \
167                                 snapshot(?:/.*)?)$" \
168                         @@cgiroot@@/snapshot.cgi/$1 [NS,L,H=cgi-script]
170                 # Make the leading /h optional for requests that name an existing .html template
171                 RewriteCond @@webroot@@/$1 !-f
172                 RewriteCond @@cgiroot@@/$1 !-f
173                 RewriteCond @@basedir@@/html/$1 -s
174                 RewriteRule \
175                         ^/(?![bchrw]/)(.*\.html)$ \
176                         /h/$1 [NS,PT]
178                 # Redirect bare gitweb requests without .git that name an existing repo...
179                 RewriteCond @@webroot@@/$2 !-f
180                 RewriteCond @@cgiroot@@/$2 !-f
181                 RewriteCond @@reporoot@@/$2.git/HEAD -s
182                 RewriteRule \
183                         "(?x)^/(?![bchr]/)((?:w/)?) \
184                         ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git))$" \
185                         /$1$2.git [NS,L,R=301]
187                 # Of the 11 possible Git protocol URLs (i.e. passed to git-http-backend-verify),
188                 # 9 are only valid with GET/HEAD and the other two are only valid with POST
189                 # Furthermore, 7 are only valid when non-smart is allowed and
190                 # 1 is only valid when smart-only is enabled if it has the correct query string.
192                 # These two always require POST
193                 RewriteCond %{REQUEST_METHOD} !=POST
194                 RewriteRule \
195                         "(?x)^/(?![bchw]/)(?:r/)? \
196                         (?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?(?:\.git)?/(?: \
197                                 git-upload-pack | \
198                                 git-receive-pack )$" \
199                         - [NS,F]
201                 <IfDefine @@SmartHTTPOnly@@>
202                 # These 7 are always forbidden when non-smart HTTP is disabled
203                 RewriteRule \
204                         "(?x)^/(?![bchw]/)(?:r/)? \
205                         (?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?(?:\.git)?/(?: \
206                                 HEAD | \
207                                 objects/info/alternates | \
208                                 objects/info/http-alternates | \
209                                 objects/info/packs | \
210                                 objects/[0-9a-f]{2}/[0-9a-f]{38} | \
211                                 objects/pack/pack-[0-9a-f]{40}\.(?:pack|idx) )$" \
212                         - [NS,F]
213                 # This one is forbidden without the magic query string when non-smart is disabled
214                 RewriteCond %{REQUEST_METHOD} !^(?:GET|HEAD)$ [OR]
215                 RewriteCond %{QUERY_STRING} !(^|&)service=git-(?:upload|receive)-pack(&|$)
216                 RewriteRule \
217                         "(?x)^/(?![bchw]/)(?:r/)? \
218                         (?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?(?:\.git)?/ \
219                                 info/refs $" \
220                         - [NS,F]
221                 # This one requires GET (or HEAD)
222                 RewriteCond %{REQUEST_METHOD} !^(?:GET|HEAD)$
223                 RewriteRule \
224                         "(?x)^/(?![bchw]/)(?:r/)? \
225                         (?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?(?:\.git)?/ \
226                                 [a-zA-Z0-9][a-zA-Z0-9+._-]*\.bundle $" \
227                         - [NS,F]
228                 </IfDefine>
230                 <IfDefine !@@SmartHTTPOnly@@>
231                 # These 9 require GET (or HEAD)
232                 RewriteCond %{REQUEST_METHOD} !^(?:GET|HEAD)$
233                 RewriteRule \
234                         "(?x)^/(?![bchw]/)(?:r/)? \
235                         (?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?(?:\.git)?/(?: \
236                                 HEAD | \
237                                 info/refs | \
238                                 objects/info/alternates | \
239                                 objects/info/http-alternates | \
240                                 objects/info/packs | \
241                                 objects/[0-9a-f]{2}/[0-9a-f]{38} | \
242                                 objects/pack/pack-[0-9a-f]{40}\.(?:pack|idx) | \
243                                 [a-zA-Z0-9][a-zA-Z0-9+._-]*\.bundle )$" \
244                         - [NS,F]
245                 # This one can be accelerated when accessed with non-smart HTTP
246                 RewriteCond %{REQUEST_METHOD} ^(?:GET|HEAD)$
247                 RewriteCond %{QUERY_STRING} !(^|&)service=git-(?:upload|receive)-pack(&|$)
248                 RewriteRule \
249                         "(?x)^/(?![bchw]/)(?:r/)? \
250                         ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?<!\.git)/)*[a-zA-Z0-9][a-zA-Z0-9+._-]*?)(?:\.git)?/ \
251                                 info/refs $" \
252                         @@reporoot@@/$1.git/info/refs [NS,L]
253                 </IfDefine>
254         </IfModule>
256         <Directory @@reporoot@@>
257                 Options FollowSymLinks
258                 AllowOverride None
259                 <IfVersion < 2.3>
260                 Order allow,deny
261                 Allow from all
262                 Satisfy all
263                 </IfVersion>
264                 <IfVersion >= 2.3>
265                 Require all granted
266                 </IfVersion>
268                 <IfModule rewrite_module>
269                         # Everything fetched over the non-smart git http
270                         # protocol should be an existing file.  If the request
271                         # is not for an existing file, just send back an error
272                         # message without emitting anything into the error log.
273                         RewriteEngine On
274                         RewriteBase /
275                         RewriteCond @@reporoot@@/$1 !-f
276                         RewriteRule ^(.*)$ - [NS,R=404,L]
277                 </IfModule>
278         </Directory>
280         <Directory @@cgiroot@@>
281                 # FollowSymLinks or SymLinksIfOwnerMatch is required for .htaccess files
282                 Options SymLinksIfOwnerMatch
283                 # FileInfo must be enabled to activate .htaccess file mod_rewrite rules
284                 AllowOverride FileInfo
285                 <IfVersion < 2.3>
286                 Order deny,allow
287                 Deny from all
288                 Satisfy all
289                 </IfVersion>
290                 <IfVersion >= 2.3>
291                 Require all denied
292                 </IfVersion>
293                 <Files gitweb.cgi>
294                         Options +ExecCGI
295                         <IfVersion < 2.3>
296                         Order deny,allow
297                         Allow from all
298                         Satisfy all
299                         </IfVersion>
300                         <IfVersion >= 2.3>
301                         Require all granted
302                         </IfVersion>
303                         <IfModule !mod_fastcgi.c>
304                         <IfModule !mod_fcgid.c>
305                                 SetHandler cgi-script
306                         </IfModule>
307                         </IfModule>
309                         # Note that in testing mod_fastcgi (in dynamic mode)
310                         # was found to be slightly faster than mod_fcgid.
311                         #
312                         # However, we prefer mod_fcgid if both are available
313                         # because we cannot control the server-global settings
314                         # of mod_fastcgi's "FastCgiConfig" options.
315                         #
316                         # In order for gitweb.cgi to run reasonably well as a
317                         # mod_fastcgi dynamic FastCGI application, the
318                         # "FastCgiConfig" option "-idle-timeout" value needs to
319                         # be increased from the default value of "30" to at
320                         # least "120", preferably more like "300".  But that
321                         # will affect ALL dynamic mod_fastcgi applications on
322                         # the ENTIRE server, not just gitweb.cgi.  Additionally
323                         # the "FastCgiConfig" "-restart" option probably ought
324                         # to be set as well.  Also, unfortunately, there is no
325                         # mod_fastcgi option corresponding to mod_fcgid's
326                         # MaxRequestsPerProcess option and gitweb.cgi running
327                         # in FastCGI mode (without using FCGI::ProcManager) will
328                         # always exit after serving 100 requests (a good thing).
329                         #
330                         # The alternative is to make gitweb.cgi a static
331                         # mod_fastcgi application (the "FastCgiServer"
332                         # directive), but then the number of running instances
333                         # will be fixed at whatever value is chosen for the
334                         # "-processes" option rather than being dynamically
335                         # adjusted based on load and that's probably undesirable
336                         # in most cases unless you run gitweb.cgi under a
337                         # front-end that dynamically forks multiple copies of
338                         # gitweb.cgi based on the current load.  See the CPAN
339                         # FCGI::ProcManager::Dynamic module for an example of
340                         # how to do this in Perl:
341                         #
342                         #   http://search.cpan.org/search?query=FCGI::ProcManager::Dynamic&mode=module
343                         #
344                         # So instead we prefer mod_fcgid because we can adjust
345                         # the necessary options for good gitweb.cgi behavior
346                         # while affecting only gitweb.cgi and having it remain
347                         # a dynamic application whose total number of running
348                         # instances is adjusted based on current server load.
350                         <IfModule mod_fcgid.c>
351                                 SetHandler fcgid-script
352                         </IfModule>
353                         <IfModule !mod_fcgid.c>
354                         <IfModule mod_fastcgi.c>
355                                 SetHandler fastcgi-script
356                         </IfModule>
357                         </IfModule>
358                 </Files>
359                 <FilesMatch ^(?!(?i)gitweb\.cgi$).*\.cgi$>
360                         Options +ExecCGI
361                         SetHandler cgi-script
362                         <IfVersion < 2.3>
363                         Order deny,allow
364                         Allow from all
365                         Satisfy all
366                         </IfVersion>
367                         <IfVersion >= 2.3>
368                         Require all granted
369                         </IfVersion>
370                 </FilesMatch>
371         </Directory>
373         <IfModule mod_fcgid.c>
374                 # mod_fcgid benefits from some additional config for gitweb.cgi
375                 # gitweb.cgi has a hard-coded maximum of 100 requests
376                 # and we do not want to give up too soon in case Git is lagging.
377                 # Note that adding a 'MaxProcesses ...' option here may be valuable
378                 # to limit the maximum number of gitweb.cgi processes that can be
379                 # spawned (default is 100) -- perhaps to something much lower such
380                 # as 1 or 2 times the number of CPU cores.  Also note that in the
381                 # unlikely event all the children finish their 100 requests at the
382                 # same time, the server's FcgidSpawnScoreUpLimit (which defaults
383                 # to 10 if not set) should be set to at least 3 times the
384                 # MaxProcesses value chosen to allow them all to respawn
385                 # immediately.  FcgidSpawnScoreUpLimit MUST be at least twice the
386                 # chosen MaxProcesses value (assuming FcgidTerminationScore is
387                 # still set to the default 2) in order to allow any child at all to
388                 # respawn immediately in this case without a delay.
389                 FcgidCmdOptions @@cgiroot@@/gitweb.cgi \
390                 MaxProcesses 8 MinProcesses 5 \
391                 MaxRequestsPerProcess 100 IOTimeout 300
392         </IfModule>
394         <Directory @@basedir@@/bin>
395                 Options None
396                 AllowOverride None
397                 <IfVersion < 2.3>
398                 Order deny,allow
399                 Deny from all
400                 Satisfy all
401                 </IfVersion>
402                 <IfVersion >= 2.3>
403                 Require all denied
404                 </IfVersion>
405                 <Files git-http-backend-verify>
406                         Options ExecCGI
407                         SetHandler cgi-script
408                         <IfVersion < 2.3>
409                         Order deny,allow
410                         Allow from all
411                         Satisfy all
412                         </IfVersion>
413                         <IfVersion >= 2.3>
414                         Require all granted
415                         </IfVersion>
416                 </Files>
417         </Directory>
419 # ---- END LINES TO DUPLICATE ----
421 </VirtualHost>
424 # Change the setting of $TLSHost in Girocco::Config.pm to change
425 # whether or not the following https virtual host is enabled.
427 <IfDefine @@TLSHost@@>
429 # This is an example configuration of an https virtualhost running Girocco, as set
430 # up at repo.or.cz; unfortunately, completely independent from Girocco::Config.
431 # It is not essential for Girocco to use a special virtualhost, however.
432 # The Config.pm $httpspushurl variable needs to be defined to properly enable
433 # https pushing.
434 <VirtualHost *:443>
436         # These certificate files will all be automatically generated, but the
437         # paths here may need to be corrected to match the paths
438         # (especially $certsdir) from Config.pm
440         SSLCertificateFile @@certsdir@@/acme/girocco_www_crt.pem
441         SSLCertificateKeyFile @@certsdir@@/acme/girocco_www_key.pem
442         SSLCertificateChainFile @@certsdir@@/acme/girocco_www_chain.pem
443         # when using a paid www server cert, only the above three lines should
444         # be changed.  Changing any of the below two lines (other than updating
445         # the paths to match $certsdir) will likely break https client auth
446         SSLCACertificateFile @@certsdir@@/girocco_root_crt.pem
447         SSLCADNRequestFile @@certsdir@@/girocco_client_crt.pem
449         SSLVerifyDepth 3
450         SSLOptions +FakeBasicAuth +StrictRequire
451         SSLEngine on
453         # This configuration allows fetching over https without a certificate
454         # while always requiring a certificate for pushing over https
455         RewriteEngine On
456         SSLVerifyClient optional
457         RewriteCond %{REQUEST_METHOD} ^(GET|HEAD)$ [NC]
458         RewriteCond %{QUERY_STRING} (^|&)service=git-receive-pack(&|$) [NC]
459         RewriteRule /info/refs$ - [NC,NS,env=client_auth_required:1]
460         RewriteCond %{REQUEST_METHOD} =POST [NC]
461         RewriteRule /git-receive-pack$ - [NC,NS,env=client_auth_required:1]
462         RewriteCond %{ENV:client_auth_required} 1
463         RewriteCond %{SSL:SSL_CLIENT_VERIFY} !^SUCCESS$
464         RewriteRule .? %{REQUEST_URI} [NS,R=401]
465         <Location />
466                 SSLRequireSSL
467                 SSLOptions +FakeBasicAuth
468                 AuthName "Git Client Authentication"
469                 AuthType Basic
470                 AuthBasicProvider anon
471                 Anonymous *
472                 <IfVersion < 2.3>
473                 Order deny,allow
474                 Deny from env=client_auth_required
475                 Satisfy any
476                 Require valid-user
477                 </IfVersion>
478                 <IfVersion >= 2.3>
479                 <RequireAny>
480                 <RequireAll>
481                 Require all granted
482                 Require not env client_auth_required
483                 </RequireAll>
484                 Require valid-user
485                 </RequireAny>
486                 </IfVersion>
487         </Location>
488         ErrorDocument 401 /authrequired.cgi
490 # ---- BEGIN DUPLICATE LINES ----
492 ##  *** IMPORTANT ***
494 ##  ALL the entire contents from the <VirtualHost *:80> section at the top of
495 ##  this file must be copied here.
497 ##  To avoid this duplication, the contents of the <VirtualHost *:80> section
498 ##  above can be moved to a separate file and then included both here and in
499 ##  the <VirtualHost *:80> section using an Include directive.  Be careful not
500 ##  to place the new include file in one of the directories the standard apache
501 ##  configuration blindly includes all files from.
503 # ---- END DUPLICATE LINES ----
505 </VirtualHost>
507 </IfDefine>