X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=docker%2Fproduction%2Fstable%2Fnginx.conf;h=e8754d9b478f85cbeb033756d2114759f1809d37;hb=2f69b6d04e399bd3efae0f12b8ad8c148fabf350;hp=e23c4587da122c790f26c6893838280c39b03908;hpb=453f4653c325dc23193e16432170bf634c42e8a2;p=github%2Fshaarli%2FShaarli.git diff --git a/docker/production/stable/nginx.conf b/docker/production/stable/nginx.conf index e23c4587..e8754d9b 100644 --- a/docker/production/stable/nginx.conf +++ b/docker/production/stable/nginx.conf @@ -11,6 +11,8 @@ http { default_type application/octet-stream; keepalive_timeout 20; + client_max_body_size 10m; + index index.html index.php; server { @@ -41,7 +43,21 @@ http { add_header Cache-Control "public, must-revalidate, proxy-revalidate"; } + location = /favicon.ico { + # serve the Shaarli favicon from its custom location + alias /var/www/shaarli/images/favicon.ico; + } + + location / { + # Slim - rewrite URLs + try_files $uri /index.php$is_args$args; + } + location ~ (index)\.php$ { + # Slim - split URL path into (script_filename, path_info) + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # filter and proxy PHP requests to PHP-FPM fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php;