From da7c9839c51b03f69152e491c3c8cf1a8936f97c Mon Sep 17 00:00:00 2001 From: Paweł Dybiec Date: Sun, 13 Oct 2019 20:24:39 +0200 Subject: Cleanup of nginx config and blocked some scanning server --- compose/nginx/Dockerfile | 12 ++++++++++-- compose/nginx/blockIps.conf | 1 + compose/nginx/nginx.conf | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 compose/nginx/blockIps.conf (limited to 'compose/nginx') diff --git a/compose/nginx/Dockerfile b/compose/nginx/Dockerfile index fcca1df..ea6be25 100644 --- a/compose/nginx/Dockerfile +++ b/compose/nginx/Dockerfile @@ -1,4 +1,12 @@ -FROM nginx:1.15.8-alpine +FROM nginx:alpine +RUN rm /etc/nginx/fastcgi.conf \ + /etc/nginx/fastcgi_params \ + /etc/nginx/scgi_params \ + /etc/nginx/uwsgi_params \ + /etc/nginx/koi-utf \ + /etc/nginx/koi-win \ + /etc/nginx/win-utf COPY static-html /usr/share/nginx/html COPY conf.d /etc/nginx/conf.d -COPY nginx.conf /etc/nginx/nginx.conf +COPY nginx.conf /etc/nginx/ +COPY blockIps.conf /etc/nginx/ diff --git a/compose/nginx/blockIps.conf b/compose/nginx/blockIps.conf new file mode 100644 index 0000000..d434459 --- /dev/null +++ b/compose/nginx/blockIps.conf @@ -0,0 +1 @@ +deny 154.202.59.137; diff --git a/compose/nginx/nginx.conf b/compose/nginx/nginx.conf index 8bf1733..1e21693 100644 --- a/compose/nginx/nginx.conf +++ b/compose/nginx/nginx.conf @@ -52,6 +52,7 @@ http { add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; include /etc/nginx/conf.d/*.conf; + include /etc/nginx/blockIps.conf; error_page 500 501 502 503 504 /50x.html; } -- cgit 1.4.1