From 453f4653c325dc23193e16432170bf634c42e8a2 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Thu, 24 Dec 2015 17:17:46 +0100 Subject: Docker: move Dockerfiles to the main repository Relates to #420 Fixes: - [all] remove Nginx' 'server_name' attribute - [dev] create the phpinfo() script from the Dockerfile Modifications: - [all] remove documentation/guide (to be added to the wiki) - [all] update maintainer information - [prod] differentiate 'master' (:latest) and 'stable' (:stable) images Signed-off-by: VirtualTam --- docker/production/stable/nginx.conf | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docker/production/stable/nginx.conf (limited to 'docker/production/stable/nginx.conf') diff --git a/docker/production/stable/nginx.conf b/docker/production/stable/nginx.conf new file mode 100644 index 00000000..e23c4587 --- /dev/null +++ b/docker/production/stable/nginx.conf @@ -0,0 +1,56 @@ +user www-data www-data; +daemon off; +worker_processes 4; + +events { + worker_connections 768; +} + +http { + include mime.types; + default_type application/octet-stream; + keepalive_timeout 20; + + index index.html index.php; + + server { + listen 80; + root /var/www/shaarli; + + access_log /var/log/nginx/shaarli.access.log; + error_log /var/log/nginx/shaarli.error.log; + + location ~ /\. { + # deny access to dotfiles + access_log off; + log_not_found off; + deny all; + } + + location ~ ~$ { + # deny access to temp editor files, e.g. "script.php~" + access_log off; + log_not_found off; + deny all; + } + + location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { + # cache static assets + expires max; + add_header Pragma public; + add_header Cache-Control "public, must-revalidate, proxy-revalidate"; + } + + location ~ (index)\.php$ { + # filter and proxy PHP requests to PHP-FPM + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi.conf; + } + + location ~ \.php$ { + # deny access to all other PHP scripts + deny all; + } + } +} -- cgit v1.2.3