summaryrefslogtreecommitdiffstats
path: root/test/pyhttpd/conf/httpd.conf.template
blob: 255b88ad05ff5af1348e5a90034979d016136d30 (plain)
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
ServerName localhost
ServerRoot "${server_dir}"

Include "conf/modules.conf"

DocumentRoot "${server_dir}/htdocs"

<IfModule log_config_module>
    LogFormat "{ \"request\": \"%r\", \"status\": %>s, \"bytes_resp_B\": %B, \"bytes_tx_O\": %O, \"bytes_rx_I\": %I, \"bytes_rx_tx_S\": %S, \"time_taken\": %D }" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    CustomLog "logs/access_log" combined

</IfModule>

TypesConfig "${gen_dir}/apache/conf/mime.types"

Listen ${http_port}
Listen ${https_port}

<IfModule mod_ssl.c>
    # provide some default
    SSLSessionCache "shmcb:ssl_gcache_data(32000)"
</IfModule>

# Insert our test specific configuration before the first vhost,
# so that its vhosts can be the default one. This is relevant in
# certain behaviours, such as protocol selection during SSL ALPN
# negotiation.
#
Include "conf/test.conf"

RequestReadTimeout header=10 body=10

<IfModule deflate_module>
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
</IfModule>
<IfModule brotli_module>
  AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css
</IfModule>

<VirtualHost *:${http_port}>
    ServerName ${http_tld}
    ServerAlias www.${http_tld}
    <IfModule ssl_module>
      SSLEngine off
    </IfModule>
    DocumentRoot "${server_dir}/htdocs"
</VirtualHost>

<Directory "${server_dir}/htdocs/cgi">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

    AddHandler cgi-script .py
    AddHandler cgi-script .cgi
    Options +ExecCGI
</Directory>