1 user www-data www-data;
6 worker_connections 768;
11 default_type application/octet-stream;
14 client_max_body_size 10m;
16 index index.html index.php;
20 root /var/www/shaarli;
22 access_log /var/log/nginx/shaarli.access.log;
23 error_log /var/log/nginx/shaarli.error.log;
26 # deny access to dotfiles
33 # deny access to temp editor files, e.g. "script.php~"
39 location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
42 add_header Pragma public;
43 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
46 location = /favicon.ico {
47 # serve the Shaarli favicon from its custom location
48 alias /var/www/shaarli/images/favicon.ico;
53 try_files $uri /index.php$is_args$args;
56 location ~ (index)\.php$ {
57 # Slim - split URL path into (script_filename, path_info)
59 fastcgi_split_path_info ^(.+\.php)(/.+)$;
61 # filter and proxy PHP requests to PHP-FPM
62 fastcgi_pass unix:/var/run/php5-fpm.sock;
63 fastcgi_index index.php;
68 # deny access to all other PHP scripts