From 99cf279595ad4808003df3f32e5bd8e7e4779872 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 21 Aug 2021 15:44:15 +0200 Subject: [PATCH] Stuff stolen from the orinal repo by fholzer --- nginx.conf | 34 ++++++++++++++++++++++++++++++++ nginx.pub | 29 ++++++++++++++++++++++++++++ nginx.vh.default.conf | 45 +++++++++++++++++++++++++++++++++++++++++++ runTests.sh | 1 + tests.sh | 10 ++++++++++ 5 files changed, 119 insertions(+) create mode 100644 nginx.conf create mode 100644 nginx.pub create mode 100644 nginx.vh.default.conf create mode 100644 runTests.sh create mode 100644 tests.sh diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..9cb5499 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,34 @@ + +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + gzip on; + brotli on; + brotli_static on; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx.pub b/nginx.pub new file mode 100644 index 0000000..01a2a5f --- /dev/null +++ b/nginx.pub @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBE7SKu8BCADQo6x4ZQfAcPlJMLmL8zBEBUS6GyKMMMDtrTh3Yaq481HB54oR +0cpKL05Ff9upjrIzLD5TJUCzYYM9GQOhguDUP8+ZU9JpSz3yO2TvH7WBbUZ8FADf +hblmmUBLNgOWgLo3W+FYhl3mz1GFS2Fvid6Tfn02L8CBAj7jxbjL1Qj/OA/WmLLc +m6BMTqI7IBlYW2vyIOIHasISGiAwZfp0ucMeXXvTtt14LGa8qXVcFnJTdwbf03AS +ljh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74q5cexKOYrMC3KuAqWbwqXhkV +s0nkWxnOIidTHSXvBZfDFA4Idwte94Thrzf8Pn8UESudTiqrWoCBXk2UyVsl03gJ +blSJAeJGYPPeo+Yj6m63OWe2+/S2VTgmbPS/RObn0Aeg7yuff0n5+ytEt2KL51gO +QE2uIxTCawHr12PsllPkbqPk/PagIttfEJqn9b0CrqPC3HREePb2aMJ/Ctw/76CO +wn0mtXeIXLCTvBmznXfaMKllsqbsy2nCJ2P2uJjOntw= +=NeQn +-----END PGP PUBLIC KEY BLOCK----- diff --git a/nginx.vh.default.conf b/nginx.vh.default.conf new file mode 100644 index 0000000..299c622 --- /dev/null +++ b/nginx.vh.default.conf @@ -0,0 +1,45 @@ +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + diff --git a/runTests.sh b/runTests.sh new file mode 100644 index 0000000..6edb2c6 --- /dev/null +++ b/runTests.sh @@ -0,0 +1 @@ +docker run --rm -v $(pwd)/tests.sh:/tests.sh --entrypoint sh nginx-brotli /tests.sh diff --git a/tests.sh b/tests.sh new file mode 100644 index 0000000..ba97dac --- /dev/null +++ b/tests.sh @@ -0,0 +1,10 @@ +if [ "x`whoami`" == "xroot" ]; then + echo "Installing test dependencies..." + apk update + apk add mercurial openssl ffmpeg uwsgi uwsgi-python perl perl-fcgi perl-gd perl-io-socket-ssl perl-net-ssleay perl-test-harness-utils + su -s /bin/sh -c /tests.sh - nginx +else + hg clone http://hg.nginx.org/nginx-tests + cd nginx-tests + TEST_NGINX_BINARY=/usr/sbin/nginx-debug TEST_NGINX_MODULES=/etc/nginx/modules TEST_NGINX_LEAVE=1 prove . +fi