aboutsummaryrefslogtreecommitdiffstats
path: root/main/nginx/default.conf
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-08-10 22:49:54 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-15 20:47:27 +0200
commit3a0f70157f46650d6b2b6eb64b740a7f64e900eb (patch)
tree705eff9ad9faa94dc460234a949bc99a2ae4cdad /main/nginx/default.conf
parente18d6b8cca1087b6c87317a3d2b5a65ca6826aa6 (diff)
downloadaports-3a0f70157f46650d6b2b6eb64b740a7f64e900eb.tar.bz2
aports-3a0f70157f46650d6b2b6eb64b740a7f64e900eb.tar.xz
main/nginx: add better default configs
Diffstat (limited to 'main/nginx/default.conf')
-rw-r--r--main/nginx/default.conf17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/nginx/default.conf b/main/nginx/default.conf
new file mode 100644
index 0000000000..4704a694ea
--- /dev/null
+++ b/main/nginx/default.conf
@@ -0,0 +1,17 @@
+# This is a default site configuration which will simply return 404, preventing
+# chance access to any other virtualhost.
+
+server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+
+ # Everything is a 404
+ location / {
+ return 404;
+ }
+
+ # You may need this to prevent return 404 recursion.
+ location = /404.html {
+ internal;
+ }
+}