diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-12-24 17:17:46 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2016-01-02 19:01:33 +0100 |
commit | 453f4653c325dc23193e16432170bf634c42e8a2 (patch) | |
tree | e74568a125834e977725fe992f458e7739d2c57a /docker/development/nginx.conf | |
parent | 0baf7842fc0cf4cbd5ca2b8c5ae6dc7a59c07700 (diff) | |
download | Shaarli-453f4653c325dc23193e16432170bf634c42e8a2.tar.gz Shaarli-453f4653c325dc23193e16432170bf634c42e8a2.tar.zst Shaarli-453f4653c325dc23193e16432170bf634c42e8a2.zip |
Docker: move Dockerfiles to the main repository
Relates to #420
Fixes:
- [all] remove Nginx' 'server_name' attribute
- [dev] create the phpinfo() script from the Dockerfile
Modifications:
- [all] remove documentation/guide (to be added to the wiki)
- [all] update maintainer information
- [prod] differentiate 'master' (:latest) and 'stable' (:stable) images
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'docker/development/nginx.conf')
-rw-r--r-- | docker/development/nginx.conf | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/docker/development/nginx.conf b/docker/development/nginx.conf new file mode 100644 index 00000000..cda09b56 --- /dev/null +++ b/docker/development/nginx.conf | |||
@@ -0,0 +1,64 @@ | |||
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 | index index.html index.php; | ||
15 | |||
16 | server { | ||
17 | listen 80; | ||
18 | root /var/www/shaarli; | ||
19 | |||
20 | access_log /var/log/nginx/shaarli.access.log; | ||
21 | error_log /var/log/nginx/shaarli.error.log; | ||
22 | |||
23 | location /phpinfo/ { | ||
24 | # add a PHP info page for convenience | ||
25 | fastcgi_pass unix:/var/run/php5-fpm.sock; | ||
26 | fastcgi_index index.php; | ||
27 | fastcgi_param SCRIPT_FILENAME /var/www/index.php; | ||
28 | include fastcgi_params; | ||
29 | } | ||
30 | |||
31 | location ~ /\. { | ||
32 | # deny access to dotfiles | ||
33 | access_log off; | ||
34 | log_not_found off; | ||
35 | deny all; | ||
36 | } | ||
37 | |||
38 | location ~ ~$ { | ||
39 | # deny access to temp editor files, e.g. "script.php~" | ||
40 | access_log off; | ||
41 | log_not_found off; | ||
42 | deny all; | ||
43 | } | ||
44 | |||
45 | location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | ||
46 | # cache static assets | ||
47 | expires max; | ||
48 | add_header Pragma public; | ||
49 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
50 | } | ||
51 | |||
52 | location ~ (index)\.php$ { | ||
53 | # filter and proxy PHP requests to PHP-FPM | ||
54 | fastcgi_pass unix:/var/run/php5-fpm.sock; | ||
55 | fastcgi_index index.php; | ||
56 | include fastcgi.conf; | ||
57 | } | ||
58 | |||
59 | location ~ \.php$ { | ||
60 | # deny access to all other PHP scripts | ||
61 | deny all; | ||
62 | } | ||
63 | } | ||
64 | } | ||