diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2018-06-20 16:29:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 16:29:06 +0200 |
commit | 9e425954817621711a528bb3bd2972692a2a528a (patch) | |
tree | e692e493688fea3f8d681c093ed574d90d75daa3 /docker/development/nginx.conf | |
parent | c648fc34f882ca6a62f5a44d1826bbd2b9852845 (diff) | |
parent | 55346c1ebed66ce29dee0eee1fec5602b2d26078 (diff) | |
download | Shaarli-9e425954817621711a528bb3bd2972692a2a528a.tar.gz Shaarli-9e425954817621711a528bb3bd2972692a2a528a.tar.zst Shaarli-9e425954817621711a528bb3bd2972692a2a528a.zip |
Merge pull request #1156 from virtualtam/v0.8-dockerfile
v0.8 - Build the Docker image from the local sources
Diffstat (limited to 'docker/development/nginx.conf')
-rw-r--r-- | docker/development/nginx.conf | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/docker/development/nginx.conf b/docker/development/nginx.conf deleted file mode 100644 index ac0c6c61..00000000 --- a/docker/development/nginx.conf +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | user www-data www-data; | ||
2 | daemon off; | ||
3 | worker_processes 4; | ||
4 | |||
5 | events { | ||
6 | worker_connections 768; | ||
7 | } | ||
8 | |||
9 | http { | ||
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 ~ (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 | } | ||