1 |
On Tue, 3 Jul 2007 15:19:14 -0700 |
2 |
Kevin O'Gorman wrote: |
3 |
|
4 |
> I emerge with the doc USE flag and generally have a bunch of stuff in |
5 |
> /usr/share/doc. Most of the time it's the HTML stuff I want to read, |
6 |
> but it's a annoyingly laborious to wade through unindexed |
7 |
> directgories and get a browser pointing to the right thing. So I |
8 |
> wrote a little Perl script to create a top-level "index.html", |
9 |
> organized by package and with a bit of rudimentary pruning. I |
10 |
> bookmarked it in Firefox, and can get to things a lot faster now. I |
11 |
> like the result, and will continue to tweak it here and there. |
12 |
> |
13 |
> Did I just reinvent a wheel? If not, is there any point it trying to |
14 |
> make this part of gentoo? If so, how would one do that? |
15 |
> |
16 |
> Current script attached. |
17 |
> |
18 |
> -- |
19 |
> Kevin O'Gorman, PhD |
20 |
|
21 |
Hi Kevin, |
22 |
|
23 |
After saving your script to /var/www/localhost/cgi-bin/makeindex.perl |
24 |
and running "chmod +x ...", I pointed firefox at |
25 |
http://localhost/cgi-bin/makeindex.perl and got the following: |
26 |
|
27 |
Internal Server Error |
28 |
|
29 |
The server encountered an internal error or misconfiguration and |
30 |
was unable to complete your request. |
31 |
|
32 |
Please contact the server administrator, root@localhost and inform |
33 |
them of the time the error occurred, and anything you might have |
34 |
done that may have caused the error. |
35 |
|
36 |
More information about this error may be available in the server |
37 |
error log. |
38 |
|
39 |
Looking in /var/log/apache2/error_log I found |
40 |
|
41 |
[Wed Jul 04 10:22:06 2007] [error] [client 127.0.0.1] malformed |
42 |
header from script. Bad header=<head><title>Index of /usr/sha: |
43 |
makeindex.perl |
44 |
|
45 |
|
46 |
Looking at other simple scripts lead me to add |
47 |
|
48 |
print "Content-type: text/html; charset=iso-8859-1\n\n"; |
49 |
|
50 |
All is good now! |
51 |
|
52 |
Cheers, |
53 |
|
54 |
David |
55 |
-- |
56 |
gentoo-user@g.o mailing list |