Google DesktopへのいわゆるReverse Proxy。
- - RHELへGoogle Desktop Linux 64bitをインストール
- - RedHat Enterprise Linux(RHEL) 5.2 64bit から Windows File Serverの共有Folderをcifsでmount
- - RHELのGoogle DesktopでWindows共有Folderを検索フォルダに追加、検索結果から参照
- Server・Clientとも同じLANセグメントなので、検索結果から直接File Serverを参照する
- Client Browserからのファイル参照時のパスは、とりあえずmod_rewrite + cgi scriptで対応
約35,000ファイルのIndexが一晩で完了。
Package
httpd-2.2.3-11.el5_2.4
google-desktop-linux-1.2.0-0088
編集したファイル
- /etc/httpd/conf/httpd.conf
ProxyRequests On
Order deny,allow
Allow from x.y.z.0
- /etc/httpd/conf.d/proxy.conf
ProxyPass /cgi-bin !
ProxyPass / http://localhost:33849/
ProxyPassReverse / http://localhost:33849/
ProxyPreserveHost Off
RewriteEngine On
RewriteRule url=([^&]+) /cgi-bin/showFile.cgi?$1 [R,L,NE]
RewriteEngine On
RewriteRule url=([^&]+) /cgi-bin/openFolder.cgi?$1 [R,L,NE]
- /var/www/cgi-bin/showFile.cgi
#!/usr/bin/perl
use URI::Escape;
my $file = uri_unescape($ENV{QUERY_STRING});
$file =~ s/\\/\//g; # to replace \ by /
$file =~ s/\+/ /g; # to replace + by space
#some operation to build a correct path
$file =~ s/\/mnt\//\/\//g;
print "Location: $file\n\n";
- /var/www/cgi-bin/openFolder.cgi
#!/usr/bin/perl
use URI::Escape;
my $file = uri_unescape($ENV{QUERY_STRING});
$file =~ s/\\/\//g; # to replace \ by /
$file =~ s/\+/ /g; # to replace + by space
#some operation to build a correct path
$file =~ s/\/mnt\//\/\//g;
$file = "$file/../";
print "Content-type: text/html\n\n";
print "Some tags to redirect\n";
print "$file\n";
問題点
- IE以外のBrowserからはHTTP 302 Found
- パスに"~"・空白等を含む場合、リンククリックで開けない
- 検索結果のフォルダが開けない
- "フォルダを開く"リンクの処理にはイマイチ
- キャッシュの表示画面から最新表示をするときのパスに未対応
- キャッシュの複数世代を未確認
参考
- Providing access to the Google Desktop search service from remote machines
- Google search from a remote machine
- Download Kaleidscope
0 件のコメント:
コメントを投稿