[typo] using typo as fcgi in url like: http://somehost/blog/...
Csillag Tamás
cstamas at digitus.itk.ppke.hu
Thu Jan 26 10:21:57 EST 2006
Hi
(I repost it here because no one at the lighttpd list answered my mail.
Thx.)
I am new to lighttpd. I like it because it is really 'lighter' than
apache and is easier to understand. However the documentation is not
enought (at least for me), or I am looking at the wrong place.
So here we go:
I set up typo (blog engine) as a fcgi application that everything hits
the webserver is handled with 'dispatcher.fcgi'.
I want to only redirect queries like http://myhost/blog/.* to
dispatcher.fcgi and answer the other like usual (webserver).
And dispatcher must get the SCRIPT_URL without 'blog'.
I tried several ways:
1. playing with url.rewrite
2. 'extension' in calling fcgi
But none of them works.
here is my config file:
---------------------------------------------------------------------
server.port = 443
server.bind = "rivendell.itk.ppke.hu"
server.event-handler = "linux-sysepoll"
server.modules = ( "mod_rewrite", "mod_fastcgi", "mod_rewrite", "mod_redirect" )
server.document-root = "/var/www/webroot"
$HTTP["url"] =~ "^/blog" {
#url.rewrite-once = ( "^/blog/(.*)" => "/$1" )
#^^^ tried but does not work
server.indexfiles = ( "dispatch.fcgi" )
server.document-root = "/var/www/public/typo/public/"
server.error-handler-404 = "/dispatch.fcgi"
}
server.errorlog = "/var/www/public/typo/log/error.log"
server.username = "www-data"
ssl.engine = "enable"
ssl.pemfile = "...somewhere/server.pem"
url.rewrite = ( "^$" => "index.html", "^([^.]+)$" => "$1.html" )
#### fastcgi module
fastcgi.server = (
".fcgi" => (
"/" => (
"min-procs" => 2,
"max-procs" => 2,
"socket" => "/tmp/typo1.socket",
"bin-path" => "/var/www/public/typo/public/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "production" ),
"idle-timeout" => 120
)
)
)
----------------------------------------------------------------------
mimetypes omitted.
Some snipplets from my typo log file.
Processing RedirectController#redirect (for 81.182.59.186 at 2006-01-25 16:10:07) [GET]
Parameters: {"from"=>["blog", "admin"], "action"=>"redirect", "controller"=>"redirect"}
Completed in 0.00701 (142 reqs/sec) | Rendering: 0.00010 (1%) | DB: 0.00162 (23%) | 404 [https://rivendell.itk.ppke.hu/blog/admin]
TIA.
--
Radioactive cats have 18 half-lives.
CSILLAG Tamas (cstamas) - http://digitus.itk.ppke.hu/~cstamas
More information about the Typo-list
mailing list