summaryrefslogtreecommitdiff
path: root/.docker/nginx
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-06 20:00:26 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-06 20:00:26 -0500
commit77a91b7adeb950a906c660bbb5c39c69a75e429d (patch)
tree5441a22beff07e43716adb2f60f0ce17c4a524da /.docker/nginx
parent58cef289674717027b6b470044504a661f3bd9ad (diff)
New Dockerfile based on Alpine Linux and Nginx/PHP-FPM
Diffstat (limited to '.docker/nginx')
-rw-r--r--.docker/nginx/nginx.conf70
1 files changed, 70 insertions, 0 deletions
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;
+ }
+}