{
"name": "httpd",
"version": "2.4.68",
"summary": "Apache HTTP Server 2.4 with the event MPM, TLS, HTTP/2, gzip and brotli, FastCGI and websocket proxying, the 2.2 access directives for old .htaccess files, every module compiled in",
"category": "server",
"license": "Apache-2.0",
"homepage": "https://httpd.apache.org/",
"source": {
"url": "https://archive.apache.org/dist/httpd/httpd-2.4.68.tar.bz2",
"sha256": "68c74d4df38c26bed4dfbdb8f3baf1eb532f3872357becc1bba5d136f6b63c06"
},
"watch": {"kind": "index", "url": "https://archive.apache.org/dist/httpd/", "regex": "httpd-([0-9]+(?:\\.[0-9]+)+[a-z]?[0-9]*)\\.tar\\.bz2", "pin": "2.4", "checksum": "{source}.sha256"},
"deps": [
"apr",
"apr-util",
"pcre2",
"zlib",
"brotli",
"openssl",
"nghttp2"
],
"env_packages": [],
"static": true,
"nss": true,
"check": "v=$(sbin/httpd -v | sed -n 's/^Server version: //p') && [ -n \"$v\" ] && [ -x bin/ab ] && [ -x bin/htpasswd ] && check_static sbin/httpd bin/ab bin/htpasswd && l=$(sbin/httpd -l) && for x in unixd authn_core authn_file authz_core authz_host access_compat authz_user auth_basic mime dir alias env setenvif headers expires reqtimeout log_config logio filter deflate brotli rewrite remoteip status autoindex version socache_shmcb ssl http2 proxy proxy_fcgi proxy_http proxy_wstunnel auth_digest authz_groupfile substitute ratelimit; do case $l in *\" mod_$x.c\"*) ;; *) echo \"httpd: mod_$x is not compiled in\" >&2; exit 1 ;; esac; done && case $l in *\" event.c\"*) ;; *) echo \"httpd: the event MPM is not compiled in\" >&2; exit 1 ;; esac && n=37 && { if [ \"$STATIC\" = 1 ]; then case $l in *\" mod_so.c\"*) echo \"httpd: mod_so in a static httpd\" >&2; exit 1 ;; esac; else case $l in *\" mod_so.c\"*) n=38 ;; *) echo \"httpd: mod_so is not compiled in\" >&2; exit 1 ;; esac; fi; } && { [ \"$(printf '%s\\n' \"$l\" | grep -c ' mod_')\" = \"$n\" ] || { echo \"httpd: not the $n modules of the recipe:\" $l >&2; exit 1; }; } && t=$(mktemp -d) && chmod 755 \"$t\" && p=$(free_port) && s=$(free_port) && { while [ \"$s\" = \"$p\" ]; do s=$(free_port) || exit 1; done; } && m=bvs-httpd-$RANDOM$RANDOM && mkdir -p \"$t/htdocs/private\" \"$t/htdocs/compat-allow\" && printf '%s\\n' \"$m\" > \"$t/htdocs/bvs.txt\" && cp \"$t/htdocs/bvs.txt\" \"$t/htdocs/private/bvs.txt\" && cp \"$t/htdocs/bvs.txt\" \"$t/htdocs/compat-allow/bvs.txt\" && seq 1 5000 > \"$t/htdocs/big.txt\" && chmod -R a+rX \"$t/htdocs\" && bin/htpasswd -nbB bvs \"$m\" > \"$t/htpasswd\" && has '^bvs:\\$2y\\$' < \"$t/htpasswd\" && chmod 644 \"$t/htpasswd\" && bin/openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -days 2 -subj /CN=localhost -addext subjectAltName=DNS:localhost -addext basicConstraints=critical,CA:FALSE -keyout \"$t/key.pem\" -out \"$t/cert.pem\" > /dev/null 2>&1 && printf 'ServerRoot \\\"%s\\\"\\nServerName localhost\\nListen 127.0.0.1:%s\\nListen 127.0.0.1:%s https\\nUser #65534\\nGroup #65534\\nPidFile \\\"%s/httpd.pid\\\"\\nDefaultRuntimeDir \\\"%s\\\"\\nErrorLog \\\"%s/error.log\\\"\\nLogLevel warn\\nTypesConfig \\\"%s/etc/httpd/mime.types\\\"\\nDocumentRoot \\\"%s/htdocs\\\"\\n\\n Require all granted\\n\\nAddOutputFilterByType BROTLI_COMPRESS;DEFLATE text/plain\\n\\n AuthType Basic\\n AuthName bvs\\n AuthUserFile \\\"%s/htpasswd\\\"\\n Require valid-user\\n\\n\\n Order deny,allow\\n Deny from all\\n Allow from 127.0.0.1\\n\\n\\n Order deny,allow\\n Deny from all\\n\\n\\n SetHandler server-status\\n Require ip 127.0.0.1\\n\\nSSLSessionCache \\\"shmcb:%s/ssl_scache(512000)\\\"\\n\\n SSLEngine on\\n SSLCertificateFile \\\"%s/cert.pem\\\"\\n SSLCertificateKeyFile \\\"%s/key.pem\\\"\\n Protocols h2 http/1.1\\n\\n' \"$t\" \"$p\" \"$s\" \"$t\" \"$t\" \"$t\" \"$PREFIX\" \"$t\" \"$t\" \"$t\" \"$t\" \"$s\" \"$t\" \"$t\" > \"$t/httpd.conf\" && sbin/httpd -t -f \"$t/httpd.conf\" 2>&1 | has 'Syntax OK' && { sbin/httpd -f \"$t/httpd.conf\" -DFOREGROUND > \"$t/stderr.log\" 2>&1 & pid=$!; } && wait_port \"$p\" && wait_port \"$s\" && c=\"/usr/bin/curl -fsS -m 10 --cacert $t/cert.pem --resolve localhost:$s:127.0.0.1\" && [ \"$($c --http1.1 \"http://127.0.0.1:$p/bvs.txt\")\" = \"$m\" ] && [ \"$($c --http1.1 \"https://localhost:$s/bvs.txt\")\" = \"$m\" ] && [ \"$($c --http2 -o \"$t/h2.out\" -w '%{http_version}' \"https://localhost:$s/bvs.txt\")\" = 2 ] && [ \"$(cat \"$t/h2.out\")\" = \"$m\" ] && $c -H 'Accept-Encoding: gzip' -D - -o \"$t/big.gz\" \"http://127.0.0.1:$p/big.txt\" | has -i '^content-encoding: gzip' && gzip -dc \"$t/big.gz\" | cmp -s - \"$t/htdocs/big.txt\" && $c -H 'Accept-Encoding: br' -D - -o \"$t/big.br\" \"http://127.0.0.1:$p/big.txt\" | has -i '^content-encoding: br' && bin/brotli -dc \"$t/big.br\" | cmp -s - \"$t/htdocs/big.txt\" && [ \"$(/usr/bin/curl -sS -m 10 -o /dev/null -w '%{http_code}' \"http://127.0.0.1:$p/private/bvs.txt\")\" = 401 ] && [ \"$($c -u \"bvs:$m\" \"http://127.0.0.1:$p/private/bvs.txt\")\" = \"$m\" ] && [ \"$($c \"http://127.0.0.1:$p/compat-allow/bvs.txt\")\" = \"$m\" ] && [ \"$(/usr/bin/curl -sS -m 10 -o /dev/null -w '%{http_code}' \"http://127.0.0.1:$p/compat-deny/bvs.txt\")\" = 403 ] && bin/ab -q -n 20 -c 2 \"http://127.0.0.1:$p/bvs.txt\" 2>&1 | has -E '^Failed requests: +0$' && $c \"http://127.0.0.1:$p/server-status?auto\" | has '^ServerMPM: event'; r=$?; [ -n \"${pid:-}\" ] && kill \"$pid\" 2> /dev/null && wait \"$pid\" 2> /dev/null; [ $r = 0 ] || cat \"$t/stderr.log\" \"$t/error.log\" >&2 2> /dev/null; rm -rf -- \"${t:?}\"; [ $r = 0 ] && echo \"$v, event MPM, $n modules compiled in: a static file over HTTP/1.1, HTTPS and HTTP/2 (self-signed), gzip and brotli, basic auth with a bcrypt htpasswd entry, Order, Deny and Allow (mod_access_compat), ab, server-status\"; exit $r"
}