summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-10-31 02:11:55 +0300
committerDevaev Maxim <[email protected]>2018-10-31 02:11:55 +0300
commitbc88a49dcc1939dfaa880c116e2f71be0081ed6a (patch)
treeb16ab4f29b4f7eea596348d74a55cc2568501fd7
parentaeed3daac547cbe6e799dfb22c11142b20fb8982 (diff)
nginx hooks for future extensions
-rw-r--r--Makefile2
-rw-r--r--configs/nginx/ext.d/noop/http-ctx.conf0
-rw-r--r--configs/nginx/ext.d/noop/main-ctx.conf0
-rw-r--r--configs/nginx/ext.d/noop/server-ctx.conf0
-rw-r--r--configs/nginx/nginx.conf6
5 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b733c22d..95da8c59 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ TESTENV_LOOP ?= /dev/loop7
TESTENV_CMD ?= /bin/bash -c " \
(socat PTY,link=$(TESTENV_HID) PTY,link=/dev/ttyS11 &) \
&& rm -rf /etc/nginx/* \
- && cp /configs/nginx/* /etc/nginx \
+ && cp -r /configs/nginx/* /etc/nginx \
&& nginx -c /etc/nginx/nginx.conf \
&& ln -s $(TESTENV_VIDEO) /dev/kvmd-streamer \
&& (losetup -d /dev/kvmd-msd || true) \
diff --git a/configs/nginx/ext.d/noop/http-ctx.conf b/configs/nginx/ext.d/noop/http-ctx.conf
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/configs/nginx/ext.d/noop/http-ctx.conf
diff --git a/configs/nginx/ext.d/noop/main-ctx.conf b/configs/nginx/ext.d/noop/main-ctx.conf
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/configs/nginx/ext.d/noop/main-ctx.conf
diff --git a/configs/nginx/ext.d/noop/server-ctx.conf b/configs/nginx/ext.d/noop/server-ctx.conf
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/configs/nginx/ext.d/noop/server-ctx.conf
diff --git a/configs/nginx/nginx.conf b/configs/nginx/nginx.conf
index f831106e..b6aa1eaf 100644
--- a/configs/nginx/nginx.conf
+++ b/configs/nginx/nginx.conf
@@ -6,6 +6,8 @@ worker_processes 4;
# error_log /tmp/nginx.error.log;
error_log /dev/null crit;
+include /etc/nginx/ext.d/*/main-ctx.conf;
+
events {
worker_connections 1024;
use epoll;
@@ -38,6 +40,8 @@ http {
server 127.0.0.1:8082 fail_timeout=0s max_fails=0;
}
+ include /etc/nginx/ext.d/*/http-ctx.conf;
+
#PROD server {
#PROD listen 80;
#PROD server_name localhost;
@@ -133,5 +137,7 @@ http {
proxy_buffering off;
proxy_ignore_headers X-Accel-Buffering;
}
+
+ include /etc/nginx/ext.d/*/server-ctx.conf;
}
}