Mercurial > dirlist-php
annotate README.md @ 17:8b222e3ffe25
Set lightbox attributes through javascript instead of php.
author | edogawaconan <me@myconan.net> |
---|---|
date | Wed, 22 Oct 2014 02:37:18 +0900 |
parents | b6b65a5b9c1a |
children | 949398173ecb |
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 | 3 |
4 Using capability of nginx. | |
5 | |
6 Basically, add this block | |
7 | |
8 location @lister { | |
10
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
9 include fastcgi_params; |
1 | 10 fastcgi_pass unix:/tmp/php-fcgi.sock; |
10
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
11 uninitialized_variable_warn off; |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
12 fastcgi_param DL_PREFIX $dl_root; |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
13 fastcgi_param DL_ROOT $dl_prefix; |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
14 fastcgi_param SCRIPT_FILENAME /path/to/index.php; |
1 | 15 } |
16 | |
10
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
17 (adjust the path to `index.php` and `php-fcgi`) |
1 | 18 |
19 And then whenever you want to autoindex a folder just add | |
20 | |
10
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
21 location / { |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
22 try_files $uri @lister; |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
23 } |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
24 |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
25 Note that if your directory is aliased, you need to set `$dl_prefix` (fastcgi `DL_PREFIX`) and `$dl_root` (fastcgi `DL_ROOT`). |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
26 |
1 | 27 location /anime/win/ { |
10
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
28 set $dl_prefix /anime/win; |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
29 set $dl_root /srv/ftp; |
47a281c1d54e
Update documentation to match current code.
edogawaconan <me@myconan.net>
parents:
1
diff
changeset
|
30 alias $dl_root/; |
1 | 31 try_files $uri @lister; |
32 } | |
33 | |
13
b6b65a5b9c1a
Change readme title and add note for apache.
edogawaconan <me@myconan.net>
parents:
12
diff
changeset
|
34 And you're done. Probably also works with apache but I have no idea how to setup it. |
12 | 35 |
36 License | |
37 ------- | |
38 | |
39 Copyright 2014 edogawaconan <me@myconan.net> | |
40 | |
41 Permission to use, copy, modify, and/or distribute this software for any | |
42 purpose with or without fee is hereby granted, provided that the above | |
43 copyright notice and this permission notice appear in all copies. | |
44 | |
45 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
46 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
47 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
48 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
49 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
50 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
51 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |