Hyper Estraier設定その2 検索用ページ設定

その前に、Apache2が動いているかどうか確認した。
Apacheの設定がぜーんぜん分かってないし、ググってもApache1の設定しか見あたらず困ったのだが、なんとか見あたった。
参考:Apache2のインストール

Apache1系では、httpd.confだけで設定を行っていました。
それと比較すると大幅変更と言っていいでしょう。
(中略)
インストール直後の状態では、/etc/apache2/sites-enabled/の下には/etc/apache2/sites-available/defaultファイルへのシンボリックファイルが置かれています。
つまり、サイト定義ファイルとして/etc/apache2/sites-available/defaultファイルが使われるようになっています。

これが分からなくてねぇ…だってhttpd.confで設定するやり方しか見あたらなくてね。

それはともかく。cgi-binがどこかといえば、/usr/lib/cgi-bin/以下らしいので、そこにestseek.cgiやestseek.conf, estseek.help, estseek.tmpl, estseek.topを入れる。

degas@debian:/etc/apache2$ cd /usr/lib/cgi-bin/
degas@debian:/usr/lib/cgi-bin$ ls
degas@debian:/usr/lib/cgi-bin$ cp /usr/lib/estraier/estseek.cgi .
cp: cannot create regular file `./estseek.cgi': 許可がありません

あ所有者がrootか。

degas@debian:/usr/lib/cgi-bin$ sudo cp /usr/lib/estraier/estseek.cgi .

estseek.confなどの日本語版は/usr/share/hyperestraier/locale/ja/以下にあるのでそこから持ってくる。

degas@debian:/usr/lib/cgi-bin$ sudo cp /usr/share/hyperestraier/locale/ja/estseek.* . 
degas@debian:/usr/lib/cgi-bin$ ls -alF
合計 108
drwxr-xr-x  2 root root  4096 2008-03-05 18:12 ./
drwxr-xr-x 51 root root 12288 2008-03-05 15:55 ../
-rwxr-xr-x  1 root root 59544 2008-03-05 18:11 estseek.cgi*
-rw-r--r--  1 root root   939 2008-03-05 19:53 estseek.conf
-rw-r--r--  1 root root 10385 2008-03-05 19:53 estseek.help
-rw-r--r--  1 root root  6700 2008-03-05 19:53 estseek.tmpl
-rw-r--r--  1 root root   133 2008-03-05 19:53 estseek.top

そして、estseek.confを適切に変更する。

indexname: /mnt/nas_share/etc/casket

replace: ^file:///mnt/nas_share/{{!}}afp://192.168.100.101/share/

これで、https://192.168.100.100/cgi-bin/estseek.cgiで検索を行うことが出来る。そして検索結果のリンクで希望のファイルを含むフォルダを開けることが出来る。

なお、この二行目は、Macからアクセスすることを想定しているのでこうなっている。
ただしFirefoxでアクセスする場合、通常では何も生じない。なので、Firefoxのabout:configでnetwork.protocol-handler.external.afpをtrueに変更する。これで「外部プロトコルの要求がある」云々の表示が出て、OKとするとフォルダが表示される。
ただし、ある種のセキュリティホールになるので注意。

Windowsではどうすればいいのか、ちょっと考え中。

replace: ^file:///mnt/nas_share/{{!}}\\192.168.100.101\share\

で良いのだろうか。