Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
how cache lighttpd with fastcgi rails?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chandle.WEi  
View profile  
 More options Aug 18, 10:58 pm
From: "Chandle.WEi" <chandle....@gmail.com>
Date: Tue, 18 Aug 2009 19:58:12 -0700 (PDT)
Local: Tues, Aug 18 2009 10:58 pm
Subject: how cache lighttpd with fastcgi rails?
rails use lighttpd fastcgi socket methods.
and I would use mod cache
 but how to set proxy.server my lighttpd version is 1.4.23
I scan http://www.linux.com.cn/modcache/
It show me below
proxy.server  = ( "/" =>
        (
                ( "host" => "x.x.x.x", "port" => 80 ) # real backend
http server ip and port
        )
)
Really?Wether  I need to build another http server for this proxy?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shellcode  
View profile  
 More options Aug 19, 12:01 am
From: shellcode <shellc...@gmail.com>
Date: Wed, 19 Aug 2009 12:01:31 +0800
Local: Wed, Aug 19 2009 12:01 am
Subject: Re: how cache lighttpd with fastcgi rails?

you can use 'svn checkout *http*://
lighttpd-improved.googlecode.com/svn/trunk/ lighttpd-improved-read-only' to
checkout newest source

mod_fastcgi is patched to work with mod_cache


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ChandleWEi  
View profile  
 More options Aug 19, 12:51 am
From: ChandleWEi <chandle....@gmail.com>
Date: Wed, 19 Aug 2009 12:51:30 +0800
Local: Wed, Aug 19 2009 12:51 am
Subject: Re: how cache lighttpd with fastcgi rails?
在 2009-08-19三的 12:01 +0800,shellcode写道:
Thx  but how to config it I find it look up  cache.bases directory but
not wirte it

I set cache.support-queries , cache.bases, cache.refresh-pattern three
params


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shellcode  
View profile  
 More options Aug 19, 1:44 am
From: shellcode <shellc...@gmail.com>
Date: Wed, 19 Aug 2009 13:44:14 +0800
Local: Wed, Aug 19 2009 1:44 am
Subject: Re: how cache lighttpd with fastcgi rails?

mod_fastcgi output contains http headers which tell modcache don't cache,
such as 'Set-Cookie:', 'Accept-Encoding', 'Vary:' and so on


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ChandleWEi  
View profile  
 More options Aug 19, 2:25 am
From: ChandleWEi <chandle....@gmail.com>
Date: Wed, 19 Aug 2009 14:25:28 +0800
Local: Wed, Aug 19 2009 2:25 am
Subject: Re: how cache lighttpd with fastcgi rails?
server.port                = 3001
cache.support-queries = "enable"
cache.debug = "enable"
cache.bases = ("/opt/cache")
cache.refresh-pattern = (
        "\.(?i)(flv)$" => "0 fetchall-for-range-request flv-streaming",
# to w>>ork with mod_flv_streaming for flv files

 "\.(?i)(js|css|xml)$" => "240", # update js/css/xml every 4 hours and

>>on refresh requests

        "\.(?i)(htm|html|shtml)$" => "30", # update html/htm/shtml every
30 mi>>nutes and on refresh requests
        "\.(?i)(jpg|bmp|jpeg|gif|png)$" => "2880", # update graphics
files eve>>ry 2 days
        "\.(?i)(rar|zip|wmv|avi|mp3|ape|rm|mpeg|mpg|wma|asf|rmvb|flv)$"
=> "0 >>fetchall-for-range-request", # cache media file forever
        "." => "30 update-on-refresh" # default to update every 30
minutes and>> on refresh requests
        )  
##mod_proxy setting, config your backend servers here
proxy.server  = ( ".jpg" =>
        (
         ( "host" => "192.168.1.242", "port" => 3001 ) # real backend
http server ip and port
        )
        )  
##it's important to enable proxy.worked-with-mod-cache or mod_proxy will
not cooperate with modcache
proxy.worked-with-mod-cache = "enable"

$HTTP["host"] == "192.168.1.242" {
    server.document-root = "/var/rails_work/v2/public"
        server.error-handler-404 = "/dispatch.fcgi"
        fastcgi.server = (".fcgi" =>
                ("localhost" =>
                 ("min-procs" => 1,
                  "max-procs" => 4,
                  "socket" => "/tmp/lighttpd/socket/rails.socket",
                  "bin-path" =>
"/var/rails_work/v2/public/dispatch.fcgi",
                  "bin-environment" => ("RAILS_ENV" => "production")
                 )
                )
                )

}-

I just want I can cache my static picture file , How to setup
lighttpd.conf?

在 2009-08-19三的 13:44 +0800,shellcode写道:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ChandleWEi  
View profile  
 More options Aug 19, 2:33 am
From: ChandleWEi <chandle....@gmail.com>
Date: Wed, 19 Aug 2009 14:33:24 +0800
Local: Wed, Aug 19 2009 2:33 am
Subject: Re: how cache lighttpd with fastcgi rails?
============================below is strace lighttpd.pid=========
ioctl(6981, FIONREAD, [53036])          = 0
read(6981, "GET /1.jpg HTTP/1.0\r\nHost: 192.1"..., 53055) = 53036
brk(0x1b148000)                         = 0x1b148000
write(3, "2009-08-19 14:29:31: (mod_cache."..., 79) = 79
stat64("/opt/cache/192.168.1.242:3001/1.jpg", 0xbf92d0ac) = -1 ENOENT
(No such file or directory)
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 6982
fcntl64(6982, F_SETFD, FD_CLOEXEC)      = 0
fcntl64(6982, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(6982, {sa_family=AF_INET, sin_port=htons(3001),
sin_addr=inet_addr("192.168.1.242")}, 16) = -1 EINPROGRESS (Operation
now in progress)
epoll_ctl(6, EPOLL_CTL_ADD, 6982, {EPOLLOUT|EPOLLERR|EPOLLHUP,
{u32=6982, u64=6982}}) = 0
setsockopt(6982, SOL_SOCKET, SO_DEBUG, NULL, 0) = -1 EINVAL (Invalid
argument)
epoll_ctl(6, EPOLL_CTL_DEL, 6981, {0, {u32=0, u64=0}}) = 0
time(NULL)                              = 1250663371
=======================================================
It looks can find cache file but can't write file to cache

I think that is my lighttpd proxy error but I don't know how to set it
在 2009-08-19三的 13:44 +0800,shellcode写道:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ChandleWEi  
View profile  
 More options Aug 19, 3:06 am
From: ChandleWEi <chandle....@gmail.com>
Date: Wed, 19 Aug 2009 15:06:40 +0800
Local: Wed, Aug 19 2009 3:06 am
Subject: Re: how cache lighttpd with fastcgi rails?
             Your means is mod_fastcgi can't use modcache?
在 2009-08-19三的 13:44 +0800,shellcode写道:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shellcode  
View profile  
 More options Aug 19, 3:28 am
From: shellcode <shellc...@gmail.com>
Date: Wed, 19 Aug 2009 15:28:03 +0800
Local: Wed, Aug 19 2009 3:28 am
Subject: Re: how cache lighttpd with fastcgi rails?

make sure that load mod_cache before mod_fastcgi


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ChandleWEi  
View profile  
 More options Aug 19, 3:39 am
From: ChandleWEi <chandle....@gmail.com>
Date: Wed, 19 Aug 2009 15:39:52 +0800
Local: Wed, Aug 19 2009 3:39 am
Subject: Re: how cache lighttpd with fastcgi rails?
Yes mod_cache before mod_fastcgi .

在 2009-08-19三的 15:28 +0800,shellcode写道:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ChandleWEi  
View profile  
 More options Aug 19, 3:52 am
From: ChandleWEi <chandle....@gmail.com>
Date: Wed, 19 Aug 2009 15:52:39 +0800
Local: Wed, Aug 19 2009 3:52 am
Subject: Re: how cache lighttpd with fastcgi rails?
It seems I can't proxy lighttpd self , it will move in circle
在 2009-08-19三的 15:28 +0800,shellcode写道:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google