From 0c0c974090af4b69120a2bb1fd59b0b3589dc5a5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 10 Mar 2018 01:36:47 +0100 Subject: fix matomo deployment --- contrib/k8s-emc/matomo-cm.yml | 82 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 contrib/k8s-emc/matomo-cm.yml (limited to 'contrib/k8s-emc/matomo-cm.yml') diff --git a/contrib/k8s-emc/matomo-cm.yml b/contrib/k8s-emc/matomo-cm.yml new file mode 100644 index 0000000..f8ce063 --- /dev/null +++ b/contrib/k8s-emc/matomo-cm.yml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: emc + name: stats-matomo + labels: + app: matomo + tier: stats +data: + nginx.conf: | + worker_processes 4; + pid /srv/nginx.pid; + error_log /dev/stderr notice; + + events { + worker_connections 768; + # multi_accept on; + } + + http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + + server_names_hash_bucket_size 64; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + access_log /dev/null; + + server { + listen 8080 default_server; + listen [::]:8080 default_server; + + server_name _; + + root /var/www/html; + + index index.php index.html index.htm; + + location / { + try_files $uri $uri/ =404; + } + + error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location ~ \.php$ { + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx; + 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 $document_root$fastcgi_script_name; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + fastcgi_param REQUEST_URI $request_uri; + fastcgi_param DOCUMENT_URI $document_uri; + fastcgi_param DOCUMENT_ROOT $document_root; + fastcgi_param SERVER_PROTOCOL $server_protocol; + 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 HTTP_X_FORWARDED_URI /matomo; + fastcgi_intercept_errors on; + fastcgi_pass 127.0.0.1:9000; + } + } + } -- cgit v1.2.3