4 pid /var/run/nginx.pid;
7 worker_connections 768;
12 default_type application/octet-stream;
15 client_max_body_size 10m;
17 index index.html index.php;
21 root /var/www/shaarli;
23 access_log /var/log/nginx/shaarli.access.log;
24 error_log /var/log/nginx/shaarli.error.log;
27 # deny access to dotfiles
34 # deny access to temp editor files, e.g. "script.php~"
40 location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
43 add_header Pragma public;
44 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
47 location = /favicon.ico {
48 # serve the Shaarli favicon from its custom location
49 alias /var/www/shaarli/images/favicon.ico;
54 try_files $uri /index.php$is_args$args;
57 location ~ (index)\.php$ {
58 # Slim - split URL path into (script_filename, path_info)
60 fastcgi_split_path_info ^(.+\.php)(/.+)$;
62 # filter and proxy PHP requests to PHP-FPM
63 fastcgi_pass unix:/var/run/php-fpm.sock;
64 fastcgi_index index.php;
69 # deny access to all other PHP scripts