From 5f2940f5752e7126f82355382a57a806dded5eb3 Mon Sep 17 00:00:00 2001 From: Andrey Volkov Date: Fri, 19 Oct 2018 18:44:20 +0000 Subject: [PATCH] Nginx blacklist --- Dockerfile | 2 ++ assets/nginx.conf.sh | 2 ++ assets/nginx/blacklist.conf | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 assets/nginx/blacklist.conf diff --git a/Dockerfile b/Dockerfile index c3b9ff4..7fc4875 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,4 +61,6 @@ RUN /opt/startup.sh # Execute Startup script when container starts +VOLUME [ "/opt/nginx" ] + CMD [ "/opt/run.sh" ] diff --git a/assets/nginx.conf.sh b/assets/nginx.conf.sh index cd1b403..139ca8d 100755 --- a/assets/nginx.conf.sh +++ b/assets/nginx.conf.sh @@ -13,5 +13,7 @@ server { location / { autoindex on; } + + include /opt/nginx/*.conf; } EOF diff --git a/assets/nginx/blacklist.conf b/assets/nginx/blacklist.conf new file mode 100644 index 0000000..cc74f61 --- /dev/null +++ b/assets/nginx/blacklist.conf @@ -0,0 +1,3 @@ +location ~ (telnet|ftp) { + return 404; +}