wok-current annotate busybox/stuff/busybox-1.18-httpd.u @ rev 10595
samba: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 26 12:47:25 2011 +0200 (2011-05-26) |
parents | ab162b37b187 |
children |
rev | line source |
---|---|
pascal@9562 | 1 Httpd already support directory listing. Install both files and try ! |
pascal@9535 | 2 |
pascal@9535 | 3 ===>8=== /etc/httpd.conf ===>8=== |
pascal@9535 | 4 H:/var/www |
pascal@9552 | 5 ===>8=== /var/www/cgi-bin/index.cgi ===>8=== |
pascal@9535 | 6 #!/bin/sh |
pascal@9535 | 7 |
pascal@9562 | 8 [ ! -d ..$QUERY_STRING ] && echo "HTTP/1.1 404 Not Found" || cat <<EOT |
pascal@9535 | 9 Content-type: text/html |
pascal@9535 | 10 |
pascal@9535 | 11 <!DOCTYPE html> |
pascal@9535 | 12 <html xmlns="http://www.w3.org/1999/xhtml"> |
pascal@9562 | 13 <head> <title>Index of $QUERY_STRING</title> </head> |
pascal@9535 | 14 <body> |
pascal@9562 | 15 <h1>Index of $QUERY_STRING</h1> |
pascal@9535 | 16 <ul> |
pascal@9562 | 17 $({ [ "$QUERY_STRING" != "/" ] && echo "../"; ls -p ..$QUERY_STRING; } | \ |
pascal@9535 | 18 sed 's|.*| <li><a href="&">&</a></li>|') |
pascal@9535 | 19 </ul> |
pascal@9535 | 20 </body> |
pascal@9535 | 21 </html> |
pascal@9535 | 22 EOT |