cookutils view lighttpd/README.md @ rev 1140

cooker.cgi: use http download
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jun 08 16:40:51 2019 +0200 (2019-06-08)
parents 2aaf73fe2cd4
children
line source
1 <meta charset="UTF-8">
3 index.cgi readme
4 ================
6 This CGI script is intended to be used on the Lighttpd powered SliTaz web
7 server. The configuration uses the modules:
9 * mod_rewrite: to have cacheable, reusable, human friendly URIs
10 * mod_compress: to save traffic
12 Examples of human friendly URIs:
14 * /busybox : the page contains all about a busybox package
15 * /busybox/receipt : the page with the busybox's receipt
16 * /busybox/files : the page with the file listing
17 * /busybox/file/bin/busybox : get the specified file
18 * /get/busybox-1.26.2.tazpkg : get the specified package
20 Example of traffic saving:
22 * glibc.log in plain form: 8.3 MB
23 * glibc.log in compressed form: 0.3 MB (3% of the original size)
26 Notes about logs
27 ----------------
29 Single resources should be associated with the discrete URI. But due to log
30 rotation, glibc.log.2 becomes glibc.log.3 after package rebuilding. In such
31 situations:
33 1. we can't point to the specified log and line within it (URI changed);
34 2. caching will fail, already cached log changes the name.
36 The solution implemented is to virtually append log name with the UNIX timestamp
37 of last modification of the log instead of sequential numbers. So, for example,
38 'glibc.log.2' will virtually became 'glibc.log.1482699768'. To find the matched
39 log we need to cycle among ten or less 'glibc.log*' physical files and compare
40 the files modification date with the date in question.
43 Full list of implemented human friendly URIs
44 --------------------------------------------
46 URI syntax | Description | URI example
47 -----------------------|----------------------------------------|-----------------------
48 / | cooker home page | /
49 /‹pkg› | brief info about ‹pkg› | /busybox
50 /‹pkg›/receipt | display ‹pkg› receipt | /busybox/receipt
51 /‹pkg›/description | display ‹pkg› description | /busybox/description
52 /‹pkg›/stuff/‹stuff› | display ‹stuff› file | /busybox/stuff/www/httpd/404.html
53 /‹pkg›/files | display ‹pkg› files list | /busybox/files
54 /‹pkg›/file/‹file› | get the ‹file› from the ‹pkg› | /busybox/file/bin/busybox
55 /get/‹package.tazpkg› | get the specified ‹package.tazpkg› | /get/busybox-1.26.2.tazpkg
56 /src/‹tarball› | get the specified sources ‹tarball› | /src/busybox-1.26.2.tar.bz2
57 /‹pkg›/man | list of man pages, display default one | /cmark/man
58 /‹pkg›/man/‹page› | display specified man ‹page› | /cmark/man/cmark.1
59 . | . | /man-db/man/es/mandb.8
60 /‹pkg›/doc | list of existing documentation files | .
61 /‹pkg›/doc/‹doc› | display specified documentation file | .
62 /‹pkg›/info | list of existing info files | .
63 /‹pkg›/info/‹info› | display specified info file | .
64 /‹pkg›/log | display the latest cooking log | /busybox/log
65 /‹pkg›/log/‹timestamp› | display the specified cooking log | /busybox/log/1482700678
68 ((unfinished))