退社。
MIME::Types が入ってたらそっからがーって mimetype.assign をはくようにした。
てけとう。
でも、mime-typeが指定されてなくて困るのは、FirefoxでCSSが適用されないってぐらいな気がするというかそんな感じなのでとりあえずこれで。
-dオプションもつけた。-Debug してなくてもデバッグ出力できるやつ。まぁserver.plと同じ。
$ ./script/myapp_lighttpd.pl -l /usr/sbin/lighttpd -d
2006-09-09 15:45:39: (log.c.75) server started
[debug] Debug messages enabled
[debug] Loaded plugins:
.----------------------------------------------------------------------------.
| Catalyst::Plugin::ConfigLoader 0.13 |
| Catalyst::Plugin::Static::Simple 0.14 |
'----------------------------------------------------------------------------'
[debug] Loaded dispatcher "Catalyst::Dispatcher"
[debug] Loaded engine "Catalyst::Engine::FastCGI"
[debug] Found home "/home/typester/tmp/MyApp"
[debug] Loaded Config "/home/typester/tmp/MyApp/myapp.yml"
[debug] Loaded components:
.-----------------------------------------------------------------+----------.
| Class | Type |
+-----------------------------------------------------------------+----------+
| MyApp::Controller::Root | instance |
'-----------------------------------------------------------------+----------'
[debug] Loaded Private actions:
.----------------------+--------------------------------------+--------------.
| Private | Class | Method |
+----------------------+--------------------------------------+--------------+
| /default | MyApp::Controller::Root | default |
| /end | MyApp::Controller::Root | end |
'----------------------+--------------------------------------+--------------'
[info] MyApp powered by Catalyst 5.7001
Yes! YEs!
あとは静的ファイルの mime-types をちゃんとサポートすれば、server.plいらない気がする。
perl -d するとき以外は。
2006-09-09 14:58:36: (connections.c.1422) Warning: Either the error-handler returned status 404 or the error-handler itself was not found: /script/myapp_fastcgi.pl
2006-09-09 14:58:36: (connections.c.1424) returning the original status 404
2006-09-09 14:58:36: (connections.c.1426) If this is a rails app: check your production.log
とか言われるわけだが、404を返す正しい方法が何かあるのだろうか?
昨日のやつ、
このパッチ当てないとうまく動かんよ、って書くの忘れてた。
あと、myapp_lighttpd.pl に -p オプションつけるとlighttpdの設定を標準出力に出すようにしてみた。
これで、lighttpd.confで
include_shell "/path/to/myapp_lighttpd.pl -p -approot /myapp/"
とか書くだけで設定完了みたいな。
まだオプション足りなくて設定きめうちで微妙だけど、なんかいいアイデアな気がする。
コメントを投稿するには上記リンクから Flickr 経由でログインする必要があります。
Flickr のアカウントをお持ちの方はユーザー登録の必要はありません。
この認証システムには Flickr の認証APIを利用しています。これに関する詳しい説明は FlickrAPI 公式ドキュメントをご覧ください。