]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - docker/development/nginx.conf
Docker: increase maximum file upload size to 10 MiB
[github/shaarli/Shaarli.git] / docker / development / nginx.conf
CommitLineData
453f4653
V
1user www-data www-data;
2daemon off;
3worker_processes 4;
4
5events {
6 worker_connections 768;
7}
8
9http {
10 include mime.types;
11 default_type application/octet-stream;
12 keepalive_timeout 20;
13
68579ad5
V
14 client_max_body_size 10m;
15
453f4653
V
16 index index.html index.php;
17
18 server {
19 listen 80;
20 root /var/www/shaarli;
21
22 access_log /var/log/nginx/shaarli.access.log;
23 error_log /var/log/nginx/shaarli.error.log;
24
25 location /phpinfo/ {
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;
31 }
32
33 location ~ /\. {
34 # deny access to dotfiles
35 access_log off;
36 log_not_found off;
37 deny all;
38 }
39
40 location ~ ~$ {
41 # deny access to temp editor files, e.g. "script.php~"
42 access_log off;
43 log_not_found off;
44 deny all;
45 }
46
47 location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
48 # cache static assets
49 expires max;
50 add_header Pragma public;
51 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
52 }
53
b7f8b874
V
54 location = /favicon.ico {
55 # serve the Shaarli favicon from its custom location
56 alias /var/www/shaarli/images/favicon.ico;
57 }
58
453f4653
V
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;
63 include fastcgi.conf;
64 }
65
66 location ~ \.php$ {
67 # deny access to all other PHP scripts
68 deny all;
69 }
70 }
71}