新月質問スレ

0a6e57e4 anonymous 2011-09-20 03:57
sakuをインストールしてみたけど、ローカルだけでは無く
リモートからも読み書きしたい!という事でapache + sakuで
設定してみたメモ。

o saku
 - admin/visitor/friend すべてlocalhostからのみ参照可に設定。
   外部からのPort 8000へのリクエストにはforbiddenを返す

o apache
 - 認証はapacheに任せる
 - mod_proxy/mod_rewriteで localhost:8000 へredirect
 - ほぼマニュアル通り
 
抜け穴あるかな?

DocumentRoot /usr/local/saku/share/saku/www
RewriteMap escape int:escape

<Directory "/usr/local/saku/share/saku/www">
  Options -Indexes -ExecCGI
  AddType text/xml;charset=UTF-8 .rdf
  RewriteEngine On
  RewriteRule ^$  gateway.cgi [L]
  RewriteRule gateway.cgi/rss rss.rdf
  RewriteRule server.cgi - [F]
#  RewriteRule ^([^/]*).js$ /STATIC/$1.js
#  RewriteRule ^([^/]*).css$ /STATIC/$1.css
#  RewriteRule favicon.ico /STATIC/favicon.ico
#  RewriteRule rss1.xsl /STATIC/rss1.xsl
  RewriteRule ^thread.cgi/(thread_[0-9A-F]*)/([0-9a-f]*)/([0-9]*).(.*) /CACHE/$1/attach/$3_$2.$4
  RewriteRule gateway.cgi(.*) http://127.0.0.1:8000/gateway.cgi${escape:$1} [P,NE]
  RewriteRule thread.cgi(.*)  http://127.0.0.1:8000/thread.cgi${escape:$1} [P,NE]
  RewriteRule admin.cgi(.*)  http://127.0.0.1:8000/admin.cgi${escape:$1} [P,NE]

  AuthType Basic
  AuthName "Saku"
  AuthUserFile /usr/local/saku/file/htpasswd
  Require valid-user
</Directory>

Alias /CACHE/ /usr/local/saku/var/cache/
<Directory "/usr/local/saku/var/cache/">
  Options -Indexes -ExecCGI
</Directory>

Top of this page. | <<last 0 1 2 3 4 5

limit: 15360KB

(新月質問スレ/510/0.7MB)

Powered by shinGETsu.