wok-4.x view busybox/stuff/busybox-1.18-httpd.u @ rev 9555
busybox/httpd: typo
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Apr 10 14:23:26 2011 +0200 (2011-04-10) |
parents | 156116e8b1c3 |
children | 9443090ed44d |
line source
1 Httpd already support directory listing:
3 Install /etc/httpd.conf, /var/www/cgi-bin/index.cgi and try !
5 ===>8=== /etc/httpd.conf ===>8===
6 H:/var/www
7 ===>8=== /var/www/cgi-bin/index.cgi ===>8===
8 #!/bin/sh
10 path=$QUERY_STRING
12 cat <<EOT
13 Content-type: text/html
15 <!DOCTYPE html>
16 <html xmlns="http://www.w3.org/1999/xhtml">
17 <head>
18 <title>Index of $path</title>
19 </head>
20 <body>
21 <h1>Index of $path</h1>
22 <ul>
23 $(cd $PWD/..$path && { [ "$path" != "/" ] && echo "../"; ls -p; } | \
24 sed 's|.*| <li><a href="&">&</a></li>|')
25 </ul>
26 </body>
27 </html>
28 EOT