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;
26 location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|oet|woff2?)$ {
29 add_header Pragma public;
30 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
33 location = /favicon.ico {
34 # serve the Shaarli favicon from its custom location
35 alias /var/www/shaarli/images/favicon.ico;
39 default_type "text/html";
40 try_files $uri $uri/ $uri.html =404;
44 # Slim - rewrite URLs & do NOT serve static files through this location
45 try_files _ /index.php$is_args$args;
48 location ~ index\.php$ {
49 # Slim - split URL path into (script_filename, path_info)
51 fastcgi_split_path_info ^(index.php)(/.+)$;
53 # filter and proxy PHP requests to PHP-FPM
54 fastcgi_pass unix:/var/run/php-fpm.sock;
55 fastcgi_index index.php;