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 # add a PHP info page for convenience
27 fastcgi_pass unix:/var/run/php5-fpm.sock;
28 fastcgi_index index.php;
29 fastcgi_param SCRIPT_FILENAME /var/www/index.php;
30 include fastcgi_params;
34 # deny access to dotfiles
41 # deny access to temp editor files, e.g. "script.php~"
47 location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
50 add_header Pragma public;
51 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
54 location = /favicon.ico {
55 # serve the Shaarli favicon from its custom location
56 alias /var/www/shaarli/images/favicon.ico;
59 location ~ (index)\.php$ {
60 # filter and proxy PHP requests to PHP-FPM
61 fastcgi_pass unix:/var/run/php5-fpm.sock;
62 fastcgi_index index.php;
67 # deny access to all other PHP scripts