annotate README.md @ 61:72580314dd6a default tip

Update source url
author nanaya <me@nanaya.pro>
date Sat, 23 Feb 2019 02:42:40 +0900
parents 25e3119e91b2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
b6b65a5b9c1a Change readme title and add note for apache.
edogawaconan <me@myconan.net>
parents: 12
diff changeset
1 dirlist
b6b65a5b9c1a Change readme title and add note for apache.
edogawaconan <me@myconan.net>
parents: 12
diff changeset
2 =======
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
3
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
4 Using capability of nginx.
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
5
29
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
6 Usage
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
7 -----
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
8
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
9 ### nginx
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
10
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
11 location @lister {
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
12 include fastcgi_params;
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
13 fastcgi_pass unix:/tmp/php-fcgi.sock;
24
f9588ccb7a42 Add note for optional parameter.
edogawaconan <me@myconan.net>
parents: 23
diff changeset
14
f9588ccb7a42 Add note for optional parameter.
edogawaconan <me@myconan.net>
parents: 23
diff changeset
15 // BEGIN -- only when using alias
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
16 uninitialized_variable_warn off;
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
17 fastcgi_param DL_DIR $dl_dir;
24
f9588ccb7a42 Add note for optional parameter.
edogawaconan <me@myconan.net>
parents: 23
diff changeset
18 // END ---- only when using alias
f9588ccb7a42 Add note for optional parameter.
edogawaconan <me@myconan.net>
parents: 23
diff changeset
19
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
20 fastcgi_param SCRIPT_FILENAME /path/to/index.php;
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
21 }
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
22
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
23 (adjust the path to `index.php` and `php-fcgi`).
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
24
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
25 And whenever a directory needs to be autoindexed, add
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
26
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
27 location / {
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
28 try_files $uri @lister;
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
29 }
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
30
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
31 .
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
32
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
33 Note that if the directory is aliased, `$dl_dir` (fastcgi `DL_DIR`) needs to be set.
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
34
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
35 location /anime/win/ {
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
36 set $dl_dir $request_filename;
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
37 alias /srv/ftp/;
38
25e3119e91b2 Fix readme.
nanaya <me@myconan.net>
parents: 31
diff changeset
38 try_files $uri @lister; // try_files "" @lister if the alias is in a regular expression location.
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
39 }
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
40
29
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
41 ### apache
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
42
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
43 Assuming `mod_rewrite` is enabled, add this `.htaccess`:
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
44
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
45 RewriteEngine On
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
46 RewriteCond %{REQUEST_FILENAME} -d
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
47 RewriteRule ^ /path/to/index.php [L]
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
48
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
49 Note that `/path/to/index.php` should be visible from your location. Or something. I don't really know Apache.
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
50
e4f534198385 Add note for apache.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
51 Also note that this `.htaccess` does not disable server processing of `php` or any other non-static files.
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
52
28
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
53 Configurations
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
54 --------------
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
55
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
56 Here are some variables which changes how it behaves:
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
57
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
58 - `DL_DIR`: sets directory to be listed.
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
59 - `DL_SHOWALL`: show or hide files which name start with `.`. Set to `1` to show.
ce92f4d41714 Add support for displaying hidden files.
edogawaconan <me@myconan.net>
parents: 24
diff changeset
60
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
61 Upgrading
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
62 ---------
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
63
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
64 When upgrading from 1.0.0, update nginx config accordingly.
12
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
65
31
73833d29dbad Add bugs note.
edogawaconan <me@myconan.net>
parents: 29
diff changeset
66 Bugs
73833d29dbad Add bugs note.
edogawaconan <me@myconan.net>
parents: 29
diff changeset
67 ----
73833d29dbad Add bugs note.
edogawaconan <me@myconan.net>
parents: 29
diff changeset
68
73833d29dbad Add bugs note.
edogawaconan <me@myconan.net>
parents: 29
diff changeset
69 Windows edition of PHP can't handle unicode filename and thus doesn't really work in Windows if you have non-ASCII files.
73833d29dbad Add bugs note.
edogawaconan <me@myconan.net>
parents: 29
diff changeset
70
12
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
71 License
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
72 -------
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
73
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
74 Copyright 2014 edogawaconan <me@myconan.net>
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
75
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
76 Permission to use, copy, modify, and/or distribute this software for any
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
77 purpose with or without fee is hereby granted, provided that the above
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
78 copyright notice and this permission notice appear in all copies.
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
79
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
80 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
81 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
82 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
83 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
84 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
85 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
86 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.