webglimpse.txt 2.09 KB
Newer Older
1 2
This describes my webglimpse experience. What a mess!

3 4
Install the /usr/ports/www/webglimpse package. I came up two problems
with this.
5

6 7 8 9
First problem: The cgi setup in the httpd.conf file was pointing at
/usr/local/share instead of /usr/local/www.  After I fixed that, I
went to /usr/local/www and cleaned it out a bit (remove cgi-bin stuff
and data links). You also need this in httpd.conf (or apache.conf).
10
Note that the automated testbed install has this, but check anyway.
11 12 13 14 15 16 17 18 19 20 21

	<Directory /usr/testbed/webglimpse>
		Options MultiViews
		AllowOverride All
		Order allow,deny
		Allow from all
	</Directory>

Second problem: The webglimpse/wginstall perl program is broken. Some
mkdir had to be commnented out. It also crapped out chmoding the stuff
it installed into /usr/local/www/cgi-bin to 755. I just did it by hand
22 23
cause I don't want to mess with it.

24 25
Note, its probably a good idea to remove the other stuff from cgi-bin.

26 27 28 29 30 31 32 33 34 35 36
Okay, so now its installed:

	cd /usr/testbed
	mkdir webglimpse
	cd webglimpse
	/usr/local/www/webglimpse/confarc

Answer the questions. Pretty obvious, although you want D(directory)
searching, and you want to store the files in /usr/testbed/webglimpse,
but you want to *search* /usr/testbed/www.

37
Next edit .wgfilter-index and add these lines at the top to keep
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
from indexing the source code and other stuff we do not want to leak out.

	Deny  (^|/)webglimpse
	Allow \.html?$
	Deny .*

Now run wgreindex in that directory again.

Next edit archive.cfg and change the urlpath line:

	urlpath http://www.emulab.net

Now for the really ugly one. We need to arrange for the files to go
through the doc wrappers! That means editing the webglimpse perl code
in one spot. In /usr/local/www/webglimpse/lib/OutputTool.pm, change
the makeLinkOutput function to this:

    sub makeLinkOutput {
    	my $self = shift;
    	my($link, $title, $date) = @_;
    
    	if ($link =~ /^(.*)\/(.*\..*)$/) {
60
    	    $link = "$main::urlpath$1/docwrapper.php3?docname=$2\n";
61 62 63 64 65 66 67 68
    	}
    	
    	my $retstring =	"<hr><b><A HREF=\"".$link."\">";
    	$retstring .= $title."</A></b>, $date<br>\n";
    
    	return $retstring;
    }