]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - .docker/nginx.conf
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / .docker / nginx.conf
CommitLineData
1a216fae 1user nginx nginx;
453f4653
V
2daemon off;
3worker_processes 4;
1a216fae 4pid /var/run/nginx.pid;
453f4653
V
5
6events {
7 worker_connections 768;
8}
9
10http {
11 include mime.types;
12 default_type application/octet-stream;
13 keepalive_timeout 20;
14
68579ad5
V
15 client_max_body_size 10m;
16
453f4653
V
17 index index.html index.php;
18
19 server {
ce901a58
A
20 listen 80;
21 root /var/www/shaarli;
453f4653
V
22
23 access_log /var/log/nginx/shaarli.access.log;
24 error_log /var/log/nginx/shaarli.error.log;
25
ce901a58 26 location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|oet|woff2?)$ {
453f4653
V
27 # cache static assets
28 expires max;
29 add_header Pragma public;
30 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
31 }
32
b7f8b874
V
33 location = /favicon.ico {
34 # serve the Shaarli favicon from its custom location
35 alias /var/www/shaarli/images/favicon.ico;
36 }
37
ce901a58
A
38 location /doc/html/ {
39 default_type "text/html";
40 try_files $uri $uri/ $uri.html =404;
41 }
42
69173356 43 location / {
ce901a58
A
44 # Slim - rewrite URLs & do NOT serve static files through this location
45 try_files _ /index.php$is_args$args;
69173356
V
46 }
47
ce901a58 48 location ~ index\.php$ {
69173356
V
49 # Slim - split URL path into (script_filename, path_info)
50 try_files $uri =404;
ce901a58 51 fastcgi_split_path_info ^(index.php)(/.+)$;
69173356 52
453f4653 53 # filter and proxy PHP requests to PHP-FPM
1a216fae 54 fastcgi_pass unix:/var/run/php-fpm.sock;
453f4653
V
55 fastcgi_index index.php;
56 include fastcgi.conf;
57 }
453f4653
V
58 }
59}