From 3712095a3c68042b9d10c7f06b973361db1d64be Mon Sep 17 00:00:00 2001 From: Timothy Priestnall Date: Thu, 19 Apr 2018 15:02:43 +0100 Subject: [PATCH 1/2] Fixed URL encoding issues with Nginx --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index cca4925..46f80b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,7 @@ ADD conf/opt/statsd/config_*.js /opt/statsd/ RUN rm /etc/nginx/sites-enabled/default ADD conf/etc/nginx/nginx.conf /etc/nginx/nginx.conf ADD conf/etc/nginx/sites-enabled/graphite-statsd.conf /etc/nginx/sites-enabled/graphite-statsd.conf +ADD conf/etc/nginx/fastcgi_params /etc/nginx/sites-enabled/graphite-statsd.conf # init django admin ADD conf/usr/local/bin/django_admin_init.exp /usr/local/bin/django_admin_init.exp From 8b6ac3f6c096e4ec9b0247731125fbcc257c14fc Mon Sep 17 00:00:00 2001 From: Timothy Priestnall Date: Thu, 19 Apr 2018 15:04:10 +0100 Subject: [PATCH 2/2] Adding fastCGI params file --- conf/etc/nginx/fastcgi_params | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 conf/etc/nginx/fastcgi_params diff --git a/conf/etc/nginx/fastcgi_params b/conf/etc/nginx/fastcgi_params new file mode 100644 index 0000000..fca3260 --- /dev/null +++ b/conf/etc/nginx/fastcgi_params @@ -0,0 +1,23 @@ +fastcgi_param QUERY_STRING $query_string; +fastcgi_param REQUEST_METHOD $request_method; +fastcgi_param CONTENT_TYPE $content_type; +fastcgi_param CONTENT_LENGTH $content_length; + +fastcgi_param SCRIPT_FILENAME $request_filename; +fastcgi_param SCRIPT_NAME $fastcgi_script_name; +fastcgi_param REQUEST_URI $uri; +fastcgi_param DOCUMENT_URI $document_uri; +fastcgi_param DOCUMENT_ROOT $document_root; +fastcgi_param SERVER_PROTOCOL $server_protocol; + +fastcgi_param GATEWAY_INTERFACE CGI/1.1; +fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + +fastcgi_param REMOTE_ADDR $remote_addr; +fastcgi_param REMOTE_PORT $remote_port; +fastcgi_param SERVER_ADDR $server_addr; +fastcgi_param SERVER_PORT $server_port; +fastcgi_param SERVER_NAME $server_name; + +fastcgi_param HTTPS $https if_not_empty; +