aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker/development/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'docker/development/nginx.conf')
-rw-r--r--docker/development/nginx.conf80
1 files changed, 0 insertions, 80 deletions
diff --git a/docker/development/nginx.conf b/docker/development/nginx.conf
deleted file mode 100644
index 79c45bfe..00000000
--- a/docker/development/nginx.conf
+++ /dev/null
@@ -1,80 +0,0 @@
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
14 client_max_body_size 10m;
15
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
54 location = /favicon.ico {
55 # serve the Shaarli favicon from its custom location
56 alias /var/www/shaarli/images/favicon.ico;
57 }
58
59 location / {
60 # Slim - rewrite URLs
61 try_files $uri /index.php$is_args$args;
62 }
63
64 location ~ (index)\.php$ {
65 # Slim - split URL path into (script_filename, path_info)
66 try_files $uri =404;
67 fastcgi_split_path_info ^(.+\.php)(/.+)$;
68
69 # filter and proxy PHP requests to PHP-FPM
70 fastcgi_pass unix:/var/run/php5-fpm.sock;
71 fastcgi_index index.php;
72 include fastcgi.conf;
73 }
74
75 location ~ \.php$ {
76 # deny access to all other PHP scripts
77 deny all;
78 }
79 }
80}