From 90208b5fa54d4c622f4f6e84ac2d905d5e30f37c Mon Sep 17 00:00:00 2001 From: Rowan Powell <rp17@it-innovation.soton.ac.uk> Date: Fri, 2 Feb 2018 16:31:21 +0000 Subject: [PATCH] Added http-stub-module to NGINX configuration install --- test/services/nginx/install-nginx.sh | 17 +++++++++++++++-- test/services/nginx/nginx.conf | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 test/services/nginx/nginx.conf diff --git a/test/services/nginx/install-nginx.sh b/test/services/nginx/install-nginx.sh index 5f44ce1..8cecfdf 100644 --- a/test/services/nginx/install-nginx.sh +++ b/test/services/nginx/install-nginx.sh @@ -31,7 +31,20 @@ yes Y | sudo apt-get install nginx # Need to set up basic stats as this not configured by default # http://nginx.org/en/docs/http/ngx_http_stub_status_module.html -nginx -s reload +sudo rm ../etc/nginx/nginx.conf +sudo cp test/services/nginx/nginx.conf ../etc/nginx/nginx.conf +#cat test/services/nginx/nginx.conf > ../etc/nginx/nginx.conf + + +sudo nginx -s reload # start NGINX -systemctl start nginx \ No newline at end of file +sudo systemctl start nginx +# --with-http_stub_status_module +#nginx -V 2>&1 | grep -o with-http_stub_status_module +#/vagrant/../etc/nginx/nginx.config + + + + +# dpkg -l | grep -c nginx \ No newline at end of file diff --git a/test/services/nginx/nginx.conf b/test/services/nginx/nginx.conf new file mode 100644 index 0000000..1c906be --- /dev/null +++ b/test/services/nginx/nginx.conf @@ -0,0 +1,14 @@ + + +events { + worker_connections 4096; ## Default: 1024 +} +http { + server { + location /nginx_status { + stub_status on; + access_log off; + allow all; + } + } +} \ No newline at end of file -- GitLab