From 77a91b7adeb950a906c660bbb5c39c69a75e429d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 6 Feb 2016 20:00:26 -0500 Subject: New Dockerfile based on Alpine Linux and Nginx/PHP-FPM --- .docker/nginx/nginx.conf | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .docker/nginx/nginx.conf (limited to '.docker/nginx') diff --git a/.docker/nginx/nginx.conf b/.docker/nginx/nginx.conf new file mode 100644 index 00000000..a09e8e12 --- /dev/null +++ b/.docker/nginx/nginx.conf @@ -0,0 +1,70 @@ +user nginx; +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + server_tokens off; + access_log off; + error_log /dev/stderr; + + server { + listen 80; + server_name localhost; + index index.php; + root /var/www/kanboard; + + location / { + try_files $uri $uri/ /index.php$is_args$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_index index.php; + include fastcgi_params; + } + + location /data { + return 404; + } + + location ~* ^.+\.(log|sqlite)$ { + return 404; + } + + location ~ /\.ht { + return 404; + } + + location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ { + expires 7d; + etag on; + } + + gzip on; + gzip_comp_level 3; + gzip_disable "msie6"; + gzip_vary on; + gzip_types + text/javascript + application/javascript + application/json + text/xml + application/xml + application/rss+xml + text/css + text/plain; + } +} -- cgit v1.2.3 From 3446d2a4c291e16c4d5f099fafb516ae391941f5 Mon Sep 17 00:00:00 2001 From: perburn Date: Fri, 12 Feb 2016 10:41:25 +0100 Subject: Added client_max_body_size to allow uploads larger than 1MB --- .docker/nginx/nginx.conf | 1 + 1 file changed, 1 insertion(+) (limited to '.docker/nginx') diff --git a/.docker/nginx/nginx.conf b/.docker/nginx/nginx.conf index a09e8e12..88c532fe 100644 --- a/.docker/nginx/nginx.conf +++ b/.docker/nginx/nginx.conf @@ -53,6 +53,7 @@ http { etag on; } + client_max_body_size 32M; gzip on; gzip_comp_level 3; gzip_disable "msie6"; -- cgit v1.2.3