Skip to content

Commit 09e0760

Browse files
committed
Initial commit, tagged v0.1
0 parents  commit 09e0760

34 files changed

+1296
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Static Web Server benchmarks setup
2+
3+
This repository contains a test web root and minimal configuration for different web servers. It is used by a Github workflow in [static-web-server repository](https://github.com/static-web-server/static-web-server) to run its performance benchmarks.

config/apache.conf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
ServerRoot /usr/lib/apache2
2+
ServerName localhost
3+
LoadModule mpm_event_module modules/mod_mpm_event.so
4+
LoadModule authz_core_module modules/mod_authz_core.so
5+
LoadModule dir_module modules/mod_dir.so
6+
LoadModule autoindex_module modules/mod_autoindex.so
7+
LoadModule deflate_module modules/mod_deflate.so
8+
LoadModule rewrite_module modules/mod_rewrite.so
9+
LoadModule headers_module modules/mod_headers.so
10+
Listen *:8080
11+
ErrorLog /dev/stderr
12+
PidFile /tmp/apache.pid
13+
Mutex sem
14+
DocumentRoot /home/runner/work/static-web-server/benchmarks-setup/testroot
15+
Options +Indexes
16+
EnableSendfile On
17+
SetOutputFilter DEFLATE
18+
19+
# Serve gzip compressed CSS and JS files if they exist
20+
# and the client accepts gzip.
21+
RewriteEngine On
22+
RewriteCond "%{HTTP:Accept-Encoding}" "gzip"
23+
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}\.gz" -s
24+
RewriteRule "^(.*)\.(html|txt)$" "$1\.$2\.gz" [QSA]
25+
26+
# Serve correct content types, and prevent mod_deflate double gzip.
27+
RewriteRule "\.html\.gz$" "-" [T=text/html,E=no-gzip:1]
28+
RewriteRule "\.txt\.gz$" "-" [T=text/plain,E=no-gzip:1]
29+
30+
<FilesMatch "(\.html\.gz|\.txt\.gz)$">
31+
# Serve correct encoding type.
32+
Header append Content-Encoding gzip
33+
34+
# Force proxies to cache gzipped &
35+
# non-gzipped css/js files separately.
36+
Header append Vary Accept-Encoding
37+
</FilesMatch>

config/lighttpd.conf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
server.document-root = "/home/runner/work/static-web-server/benchmarks-setup/testroot"
2+
server.modules += ( "mod_deflate", "mod_setenv", "mod_indexfile", "mod_dirlisting" )
3+
server.port = 8080
4+
server.use-ipv6 = "enable"
5+
server.v4mapped = "enable"
6+
index-file.names = ( "index.html" )
7+
dir-listing.activate = "enable"
8+
deflate.allowed-encodings = ( "br", "gzip", "deflate", "bzip2", "zstd" )
9+
deflate.mimetypes = ( "text/html", "text/plain" )
10+
11+
$HTTP["url"] =~ "\.txt\.gz" {
12+
setenv.add-response-header = ( "Content-Encoding" => "gzip" )
13+
mimetype.assign = (".txt.gz" => "text/plain")
14+
deflate.mimetypes = ( )
15+
}
16+
17+
$HTTP["url"] =~ "\.html\.gz" {
18+
setenv.add-response-header = ( "Content-Encoding" => "gzip" )
19+
mimetype.assign = (".html.gz" => "text/html")
20+
deflate.mimetypes = ( )
21+
}

config/nginx.conf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
daemon off;
2+
error_log /dev/stderr warn;
3+
pid /tmp/nginx.pid;
4+
events {}
5+
http {
6+
include /etc/nginx/mime.types;
7+
charset utf-8;
8+
access_log off;
9+
sendfile on;
10+
tcp_nopush on;
11+
gzip on;
12+
gzip_static on;
13+
gzip_vary on;
14+
gzip_types text/plain;
15+
client_body_temp_path /tmp;
16+
proxy_temp_path /tmp;
17+
fastcgi_temp_path /tmp;
18+
uwsgi_temp_path /tmp;
19+
scgi_temp_path /tmp;
20+
server {
21+
server_name localhost;
22+
listen 127.0.0.1:8080;
23+
listen [::1]:8080;
24+
location / {
25+
root /home/runner/work/static-web-server/benchmarks-setup/testroot;
26+
autoindex on;
27+
}
28+
}
29+
}

config/sws.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[general]
2+
port = 8080
3+
root = "/home/runner/work/static-web-server/benchmarks-setup/testroot"
4+
directory-listing = true
5+
compression = true
6+
compression-static = true

testroot/dirlargeindex/index.html

Lines changed: 399 additions & 0 deletions
Large diffs are not rendered by default.

testroot/dirsmallindex/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

testroot/emptydir/.donotremove

Whitespace-only changes.

testroot/filler01.txt

Whitespace-only changes.

testroot/filler02.txt

Whitespace-only changes.

testroot/filler03.txt

Whitespace-only changes.

testroot/filler04.txt

Whitespace-only changes.

testroot/filler05.txt

Whitespace-only changes.

testroot/filler06.txt

Whitespace-only changes.

testroot/filler07.txt

Whitespace-only changes.

testroot/filler08.txt

Whitespace-only changes.

testroot/filler09.txt

Whitespace-only changes.

testroot/filler10.txt

Whitespace-only changes.

testroot/filler11.txt

Whitespace-only changes.

testroot/filler12.txt

Whitespace-only changes.

testroot/filler13.txt

Whitespace-only changes.

testroot/filler14.txt

Whitespace-only changes.

testroot/filler15.txt

Whitespace-only changes.

testroot/filler16.txt

Whitespace-only changes.

testroot/filler17.txt

Whitespace-only changes.

testroot/filler18.txt

Whitespace-only changes.

testroot/filler19.txt

Whitespace-only changes.

testroot/filler20.txt

Whitespace-only changes.

testroot/large.txt

Lines changed: 399 additions & 0 deletions
Large diffs are not rendered by default.

testroot/large_precompressed.txt

Lines changed: 399 additions & 0 deletions
Large diffs are not rendered by default.

testroot/large_precompressed.txt.gz

18.1 KB
Binary file not shown.

testroot/small.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

testroot/small_precompressed.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

testroot/small_precompressed.txt.gz

295 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)