Hi, I''m halfway developing a tiny plugin that allows people to scrub flash video files. I''ve got my plugin setup to monitor a directory /movies. Whenever a .flv file is requested within that directory, some stuff should happen, if not, the request should be processed as usual. I don''t know how to do the latter.. require ''mongrel'' require ''gem_plugin'' class Streamert < GemPlugin::Plugin "/handlers" include Mongrel::HttpHandlerPlugin def initialize(options = {}) @docroot = options[:cwd] + "/" + options[:docroot] end def process(request, response) # only stream flv files unless File.extname(request.params[''REQUEST_PATH'']).downcase == ''.flv'' # somehow call the original process method? end ... end How would I accomplish this? Jeroen
On 3/12/07, Jeroen Houben <jeroen at supercool.nl> wrote:> Hi, > > I''m halfway developing a tiny plugin that allows people to scrub flash > video files. I''ve got my plugin setup to monitor a directory /movies. > Whenever a .flv file is requested within that directory, some stuff > should happen, if not, the request should be processed as usual. I don''t > know how to do the latter..I''m pretty sure you can stack handlers. If your handler doesn''t send a response it just goes to the next one in line. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com
On Mon, 12 Mar 2007 13:47:27 +0100 Jeroen Houben <jeroen at supercool.nl> wrote:> Hi, > > I''m halfway developing a tiny plugin that allows people to scrub flash > video files. I''ve got my plugin setup to monitor a directory /movies. > Whenever a .flv file is requested within that directory, some stuff > should happen, if not, the request should be processed as usual. I don''t > know how to do the latter..Handlers are put in a chain and you can load them in front or back (default is in back). In your case, you want your handler to either do the processing and then set the response to finished (see HttpResponse docs), or simply ignore the request and let it continue. Then, you''ll just register the handler on "/" but give the :in_front => true option. Let me know if you need more than that. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/
Zed A. Shaw wrote:> On Mon, 12 Mar 2007 13:47:27 +0100 > Jeroen Houben <jeroen at supercool.nl> wrote: > >> Hi, >> >> I''m halfway developing a tiny plugin that allows people to scrub flash >> video files. I''ve got my plugin setup to monitor a directory /movies. >> Whenever a .flv file is requested within that directory, some stuff >> should happen, if not, the request should be processed as usual. I don''t >> know how to do the latter.. > > Handlers are put in a chain and you can load them in front or back > (default is in back). In your case, you want your handler to either do > the processing and then set the response to finished (see HttpResponse > docs), or simply ignore the request and let it continue. Then, you''ll > just register the handler on "/" but give the :in_front => true option. > > Let me know if you need more than that. >Hi Zed, thanks for your reply. Okay I understand the theory, but how do I continue? I thought simply returning from my process() method would do the trick, but the code below doesn''t work, it gives a 404 for files that do exists, but are not flv. I just want any file that is not .flv to be served normally. def process(request, response) # only stream flv files if File.extname(request.params[''REQUEST_PATH'']).downcase == ''.flv'' puts "not a flv, so returning to the next handler on the stack" return end Here''s my config: uri "/movies", :handler => plugin("/handlers/streamert"), :in_front => true I''ll post the whole init.rb below, just in case. require ''mongrel'' require ''gem_plugin'' class Streamert < GemPlugin::Plugin "/handlers" include Mongrel::HttpHandlerPlugin def initialize(options = {}) @docroot = options[:cwd] + "/" + options[:docroot] end def process(request, response) # only stream flv files if File.extname(request.params[''REQUEST_PATH'']).downcase == ''.flv'' puts "not a flv, so returning to the next handler on the stack" return end filename = @docroot + request.params[''REQUEST_PATH''] # check if file exists unless File.exists?(filename) && File.readable?(filename) response.start(404, true) do |head,out| out.write "Could not open file #{request.params[''REQUEST_PATH'']}\n" end end # see if an offset was given offset = Mongrel::HttpRequest.query_parse(request.params[''QUERY_STRING''])[''offset''].to_i # check for sane offset offset = 0 unless (0...File.size(filename)).include? offset begin response.start(200, true) do |head,out| head[''Content-Type''] = ''video/x-flv'' # write flv marker bytes to response stream if pos != 0 out.write "FLV" out.write [1].pack("C") out.write [1].pack("C") out.write [9].pack("N") out.write [9].pack("N") end # read and output flv file optionally starting at a given offset File.open(filename, "rb") do |f| f.seek(offset) while (!f.eof) do out.write f.read(8092) end end end rescue Exception => e response.start(500, true) do |head,out| out.write "error proceessing #{request.params[''REQUEST_PATH'']}\n" end end end end
Jeroen Houben
2007-Mar-15 12:49 UTC
[Mongrel] need help writing a plugin - Still hoping for an answer :-)
Jeroen Houben wrote:> Zed A. Shaw wrote: > >> On Mon, 12 Mar 2007 13:47:27 +0100 >> Jeroen Houben <jeroen at supercool.nl> wrote: >> >> >>> Hi, >>> >>> I''m halfway developing a tiny plugin that allows people to scrub flash >>> video files. I''ve got my plugin setup to monitor a directory /movies. >>> Whenever a .flv file is requested within that directory, some stuff >>> should happen, if not, the request should be processed as usual. I don''t >>> know how to do the latter.. >>> >> Handlers are put in a chain and you can load them in front or back >> (default is in back). In your case, you want your handler to either do >> the processing and then set the response to finished (see HttpResponse >> docs), or simply ignore the request and let it continue. Then, you''ll >> just register the handler on "/" but give the :in_front => true option. >> >> Let me know if you need more than that. >> >> > > Hi Zed, thanks for your reply. > > Okay I understand the theory, but how do I continue? I thought simply > returning from my process() method would do the trick, but the code > below doesn''t work, it gives a 404 for files that do exists, but are not > flv. I just want any file that is not .flv to be served normally. > > def process(request, response) > > # only stream flv files > if File.extname(request.params[''REQUEST_PATH'']).downcase == ''.flv'' > puts "not a flv, so returning to the next handler on the stack" > return > end > > > Here''s my config: > > uri "/movies", > :handler => plugin("/handlers/streamert"), > :in_front => true > > > I''ll post the whole init.rb below, just in case. > > require ''mongrel'' > require ''gem_plugin'' > > class Streamert < GemPlugin::Plugin "/handlers" > include Mongrel::HttpHandlerPlugin > > def initialize(options = {}) > @docroot = options[:cwd] + "/" + options[:docroot] > end > > def process(request, response) > > # only stream flv files > if File.extname(request.params[''REQUEST_PATH'']).downcase == ''.flv'' > puts "not a flv, so returning to the next handler on the stack" > return > end > > filename = @docroot + request.params[''REQUEST_PATH''] > > # check if file exists > unless File.exists?(filename) && File.readable?(filename) > response.start(404, true) do |head,out| > out.write "Could not open file #{request.params[''REQUEST_PATH'']}\n" > end > end > > # see if an offset was given > offset = > Mongrel::HttpRequest.query_parse(request.params[''QUERY_STRING''])[''offset''].to_i > # check for sane offset > offset = 0 unless (0...File.size(filename)).include? offset > > begin > response.start(200, true) do |head,out| > > head[''Content-Type''] = ''video/x-flv'' > > # write flv marker bytes to response stream > if pos != 0 > out.write "FLV" > out.write [1].pack("C") > out.write [1].pack("C") > out.write [9].pack("N") > out.write [9].pack("N") > end > > # read and output flv file optionally starting at a given offset > File.open(filename, "rb") do |f| > f.seek(offset) > while (!f.eof) do > out.write f.read(8092) > end > end > end > rescue Exception => e > response.start(500, true) do |head,out| > out.write "error proceessing #{request.params[''REQUEST_PATH'']}\n" > end > end > > end > > end > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Jan Svitok
2007-Mar-16 10:37 UTC
[Mongrel] need help writing a plugin - Still hoping for an answer :-)
On 3/15/07, Jeroen Houben <jeroen at supercool.nl> wrote:> Jeroen Houben wrote: > > Hi Zed, thanks for your reply. > > > > Okay I understand the theory, but how do I continue? I thought simply > > returning from my process() method would do the trick, but the code > > below doesn''t work, it gives a 404 for files that do exists, but are not > > flv. I just want any file that is not .flv to be served normally.Hi, if nobody answers, maybe you can resort to reading the mongrel sources ;-) look in lib/mongrel.rb for # Process each handler in registered order until we run out or one finalizes the response. handlers.each do |handler| handler.process(request, response) break if response.done or client.closed? end # And finally, if nobody closed the response off, we finalize it. unless response.done or client.closed? response.finished end The sources are pretty readable, so you should find your way pretty fast. I suspect that the problem is that the "normal processing" plugin is not there. See the lines just after those I posted. Or add some traces there to see what''s going on(like what handlers are tried etc.)
Jeroen Houben
2007-Mar-16 12:40 UTC
[Mongrel] need help writing a plugin - Still hoping for an answer :-)
Jan Svitok wrote:> On 3/15/07, Jeroen Houben <jeroen at supercool.nl> wrote: > >> Jeroen Houben wrote: >> >>> Hi Zed, thanks for your reply. >>> >>> Okay I understand the theory, but how do I continue? I thought simply >>> returning from my process() method would do the trick, but the code >>> below doesn''t work, it gives a 404 for files that do exists, but are not >>> flv. I just want any file that is not .flv to be served normally. >>> > > Hi, > > if nobody answers, maybe you can resort to reading the mongrel sources ;-) > > I suspect that the problem is that the "normal processing" > plugin is not there. See the lines just after those I posted. Or add > some traces there to see what''s going on(like what handlers are tried > etc.) >I think you''re right, adding some traces gives me this: outputtings handlers for /10/metadata.yml Streamert outputtings handlers for /favicon.ico Mongrel::Rails::RailsHandler outputtings handlers for /favicon.ico Mongrel::Rails::RailsHandler I wonder why it hasn''t registered the Streamert handler in front of the rails handler. Here''s my config uri "/movies", :handler => plugin("/handlers/streamert"), :in_front => true if I change the first line to uri "/", things will work, but I then my plugin gets called for every request. Not very efficient, I mean, it''s fine for what I''m going to do, but having it "listen" only to URLs under /movies seems more elegant. Anyways, thanks for your help! Jeroen
I need to deploy an app that requires SSL on a linux/apache 2.0 server that cannot be upgraded to apache 2.2. I''m a bit concerned that using pound and avoiding apache entirely will mess up my Plesk setup, but I''m willing to take a gamble on that, or any other approach that someone''s found effective. Suggestions? --------------------------------- Get your own web address. Have a HUGE year through Yahoo! Small Business. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070316/0d1d6a94/attachment.html
On 3/16/07, magic hat <magic_hat60622 at yahoo.com> wrote:> > I need to deploy an app that requires SSL on a linux/apache 2.0 server > that cannot be upgraded to apache 2.2. > > I''m a bit concerned that using pound and avoiding apache entirely will > mess up my Plesk setup, but I''m willing to take a gamble on that, or any > other approach that someone''s found effective. Suggestions?This is entirely doable (as we have just that very setup in production right now). I have a page for the docs site into Zed for review that details the steps (sans SSL, but that''s just apache config). The key to the whole thing is from this article (previously posted on the list): http://times.usefulinc.com/2006/09/13-mongrel-apache20 I would also recommend using the latest pre-release mongrel_cluster, as there are just too many good features in there to not use it. Pat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070316/699686a0/attachment-0001.html
Jan Svitok
2007-Mar-16 13:53 UTC
[Mongrel] need help writing a plugin - Still hoping for an answer :-)
On 3/16/07, Jeroen Houben <jeroen at supercool.nl> wrote:> Jan Svitok wrote: > > On 3/15/07, Jeroen Houben <jeroen at supercool.nl> wrote: > > > >> Jeroen Houben wrote: > >> > >>> Hi Zed, thanks for your reply. > >>> > >>> Okay I understand the theory, but how do I continue? I thought simply > >>> returning from my process() method would do the trick, but the code > >>> below doesn''t work, it gives a 404 for files that do exists, but are not > >>> flv. I just want any file that is not .flv to be served normally. > >>> > > > > Hi, > > > > if nobody answers, maybe you can resort to reading the mongrel sources ;-) > > > > I suspect that the problem is that the "normal processing" > > plugin is not there. See the lines just after those I posted. Or add > > some traces there to see what''s going on(like what handlers are tried > > etc.) > > > > I think you''re right, adding some traces gives me this: > > outputtings handlers for /10/metadata.yml > Streamert > > outputtings handlers for /favicon.ico > Mongrel::Rails::RailsHandler > > outputtings handlers for /favicon.ico > Mongrel::Rails::RailsHandler > > I wonder why it hasn''t registered the Streamert handler in front of the > rails handler. Here''s my config > > uri "/movies", > :handler => plugin("/handlers/streamert"), > :in_front => true > > > if I change the first line to uri "/", > > things will work, but I then my plugin gets called for every request. > Not very efficient, I mean, it''s fine for what I''m going to do, but > having it "listen" only to URLs under /movies seems more elegant. > > Anyways, thanks for your help! > > JeroenI guess it''s designed to enable override for particular subtrees, e. g. / for rails *Except* /img that will be handled by a special handler. Maybe there''s a way to tell Rails handler to listen on / and /movies or create another rails handler, though I think the first approach will be easier - you probably don''t want to have two rails handlers in one mongrel, but I might be wrong.
Zed A. Shaw
2007-Mar-16 14:58 UTC
[Mongrel] need help writing a plugin - Still hoping for an answer :-)
On Fri, 16 Mar 2007 13:40:29 +0100 Jeroen Houben <jeroen at supercool.nl> wrote:> uri "/movies", > :handler => plugin("/handlers/streamert"), > :in_front => trueYou''re on the right track, the only thing is you need to register it to "/" not "/movies". Then, your handler will be registered to the same path as Rails but in front of the RailsHandler. If you need to make sure requests are only for /movies, add a small bit of checking for that in your handler. Otherwise that should work. Just FYI, how this works is handlers are put onto a uri in a chain (just an array of handlers). Before your config it looks like this: "/" => [RailsHandler] What you did was this: "/" => [RailsHandler], "/movies" => [streamert] So, it''ll only run when /movies is requested, but NOT chain onto RailsHandler next. By doing uri "/" instead of uri "/movies" you get this: "/" => [streamert, RailsHandler] Which is what you want. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/
I''m not quite to the point where I need to worry about multiple mongrel processes -- the ssl is actually what''s giving me trouble. I tried adding RequestHeader set X_FORWARDED_PROTO ''https'' to my .conf file, but that makes apache barf. Patrick Berry <pberry at gmail.com> wrote: On 3/16/07, magic hat <magic_hat60622 at yahoo.com> wrote: I need to deploy an app that requires SSL on a linux/apache 2.0 server that cannot be upgraded to apache 2.2. I''m a bit concerned that using pound and avoiding apache entirely will mess up my Plesk setup, but I''m willing to take a gamble on that, or any other approach that someone''s found effective. Suggestions? This is entirely doable (as we have just that very setup in production right now). I have a page for the docs site into Zed for review that details the steps (sans SSL, but that''s just apache config). The key to the whole thing is from this article (previously posted on the list): http://times.usefulinc.com/2006/09/13-mongrel-apache20 I would also recommend using the latest pre-release mongrel_cluster, as there are just too many good features in there to not use it. Pat _______________________________________________ Mongrel-users mailing list Mongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users --------------------------------- Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070316/faebaa4f/attachment.html
Okay, thanks to all for the help. This is now working fine. I just needed a separate ssl conf file that mirrored my standard conf file with the exception of the last line: RequestHeader set X_FORWARDED_PROTO ''https'' Patrick Berry <pberry at gmail.com> wrote: On 3/16/07, magic hat <magic_hat60622 at yahoo.com> wrote: I need to deploy an app that requires SSL on a linux/apache 2.0 server that cannot be upgraded to apache 2.2. I''m a bit concerned that using pound and avoiding apache entirely will mess up my Plesk setup, but I''m willing to take a gamble on that, or any other approach that someone''s found effective. Suggestions? This is entirely doable (as we have just that very setup in production right now). I have a page for the docs site into Zed for review that details the steps (sans SSL, but that''s just apache config). The key to the whole thing is from this article (previously posted on the list): http://times.usefulinc.com/2006/09/13-mongrel-apache20 I would also recommend using the latest pre-release mongrel_cluster, as there are just too many good features in there to not use it. Pat _______________________________________________ Mongrel-users mailing list Mongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users --------------------------------- Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos'' Green Center. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070316/95476387/attachment.html
Is that set in the virtual host section where all the other SSL stuff is being set? Here is a snippet from our config: <VirtualHost 132.241.82.93:443> [...snip] SSLEngine on SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key RequestHeader set X_FORWARDED_PROTO ''https'' [...snip] </VirtualHost> What exactly is configtest saying the problem is? Pat On 3/16/07, magic hat <magic_hat60622 at yahoo.com> wrote:> > I''m not quite to the point where I need to worry about multiple mongrel > processes -- the ssl is actually what''s giving me trouble. > > I tried adding > > RequestHeader set X_FORWARDED_PROTO ''https'' to my .conf file, but that makes apache barf. > > > *Patrick Berry <pberry at gmail.com>* wrote: > > > > On 3/16/07, magic hat <magic_hat60622 at yahoo.com> wrote: > > > > I need to deploy an app that requires SSL on a linux/apache 2.0 server > > that cannot be upgraded to apache 2.2. > > > > I''m a bit concerned that using pound and avoiding apache entirely will > > mess up my Plesk setup, but I''m willing to take a gamble on that, or any > > other approach that someone''s found effective. Suggestions? > > > > This is entirely doable (as we have just that very setup in production > right now). I have a page for the docs site into Zed for review that > details the steps (sans SSL, but that''s just apache config). The key to the > whole thing is from this article (previously posted on the list): > > http://times.usefulinc.com/2006/09/13-mongrel-apache20 > > I would also recommend using the latest pre-release mongrel_cluster, as > there are just too many good features in there to not use it. > > Pat > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > > ------------------------------ > Bored stiff? <http://us.rd.yahoo.com/evt=49935/*http://games.yahoo.com>Loosen up... > Download and play hundreds of games for free<http://us.rd.yahoo.com/evt=49935/*http://games.yahoo.com>on Yahoo! Games. > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070316/0e27641b/attachment.html
Apache 2.0 is a real dog, 2.2 is a whole lot better. Is politics or risk the reason for no upgrade? If so, you should consider the stability and security factors. I would strongly recommend against running Apache 2.0 in production when 2.2 is available. On Fri, 16 Mar 2007 09:28:23 -0700, Patrick Berry wrote: > Is that set in the virtual host section where all the other SSL stuff is > being set? > > Here is a snippet from our config: > > > [...snip] > SSLEngine on > SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt SSLCertificateKeyFile > /etc/httpd/conf/ssl.key/server.key RequestHeader set X_FORWARDED_PROTO > ''https'' [...snip] > > What exactly is configtest saying the problem is? > > Pat > > On 3/16/07, magic hat wrote:> I''m not quite to > the point where I need to worry about multiple mongrel processes -- the ssl > is actually what''s giving me trouble. > >> I tried adding >> RequestHeader set X_FORWARDED_PROTO ''https'' to my .conf file, but that >> makes apache barf. >> >> >> Patrick Berry < pberry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> >> >>> On 3/16/07, magic hat wrote:> I need to >>> deploy an app that requires SSL on a linux/apache 2.0 server that cannot >>> be upgraded to apache 2.2. >>> >>>> I''m a bit concerned that using pound and avoiding apache entirely will >>>> mess up my Plesk setup, but I''m willing to take a gamble on that, or >>>> any other approach that someone''s found effective. Suggestions? >>>> >>> >>> This is entirely doable (as we have just that very setup in production >>> right now). I have a page for the docs site into Zed for review that >>> details the steps (sans SSL, but that''s just apache config). The key to >>> the whole thing is from this article (previously posted on the list): >>> >>> http://times.usefulinc.com/2006/09/13-mongrel-apache20 >>> >>> I would also recommend using the latest pre-release mongrel_cluster, as >>> there are just too many good features in there to not use it. >>> >>> Pat >>> >>> >>> _______________________________________________ Mongrel-users mailing >>> list Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org >>> http://rubyforge.org/mailman/listinfo/mongrel-users >> >> >> Bored stiff? Loosen up... >> Download and play hundreds of games for free on Yahoo! Games. >> >> >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org >> http://rubyforge.org/mailman/listinfo/mongrel-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Not to get all curmudgeony, but these html emails are impossible to read in mutt. On Sat, Mar 17, 2007 at 09:53:40PM -0500 thus spake Bill Tribley:> <html><head><meta name="Generator" content="PSI HTML/CSS Generator"/> > <style type="text/css"><!-- > body{font-family:''Tahoma'';font-size:12pt;font-color:''#000000'';} > LI{display:list-item;margin:0.00in;} > p{display:block;margin:0.00in;} > --></style> > </head><BODY ><div><SPAN style="font-size:12pt;">Apache 2.0 is a real dog, 2.2 is a whole lot better. Is politics or risk the reason for no upgrade? If so, you should consider the stability and security factors. I would strongly recommend against running Apache 2.0 in production when 2.2 is available.<br /><br /></span></div> > <div><SPAN style="font-size:12pt;">On Fri, 16 Mar 2007 09:28:23 -0700, Patrick Berry wrote:</SPAN></div> > <div><SPAN style="font-size:12pt;">> Is that set in the virtual host section where all the other SSL stuff is</SPAN></div> > <div><SPAN style="font-size:12pt;">> being set?</SPAN></div> > <div><SPAN style="font-size:12pt;">></SPAN></div> > <div><SPAN style="font-size:12pt;">> Here is a snippet from our config:</SPAN></div> > <div><SPAN style="font-size:12pt;">></SPAN></div> > <div><SPAN style="font-size:12pt;">> <VirtualHost 132.241.82.93:443></SPAN></div> > <div><SPAN style="font-size:12pt;">> [...snip]</SPAN></div> > <div><SPAN style="font-size:12pt;">> SSLEngine on</SPAN></div> > <div><SPAN style="font-size:12pt;">> SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt SSLCertificateKeyFile</SPAN></div> > <div><SPAN style="font-size:12pt;">> /etc/httpd/conf/ssl.key/server.key RequestHeader set X_FORWARDED_PROTO</SPAN></div> > <div><SPAN style="font-size:12pt;">> ''https'' [...snip] </VirtualHost></SPAN></div> > <div><SPAN style="font-size:12pt;">></SPAN></div> > <div><SPAN style="font-size:12pt;">> What exactly is configtest saying the problem is?</SPAN></div> > <div><SPAN style="font-size:12pt;">></SPAN></div> > <div><SPAN style="font-size:12pt;">> Pat</SPAN></div> > <div><SPAN style="font-size:12pt;">></SPAN></div> > <div><SPAN style="font-size:12pt;">> On 3/16/07, magic hat <magic_hat60622 at yahoo.com > wrote:> I''m not quite to</SPAN></div> > <div><SPAN style="font-size:12pt;">> the point where I need to worry about multiple mongrel processes -- the ssl</SPAN></div> > <div><SPAN style="font-size:12pt;">> is actually what''s giving me trouble.</SPAN></div> > <div><SPAN style="font-size:12pt;">></SPAN></div> > <div><SPAN style="font-size:12pt;">>> I tried adding</SPAN></div> > <div><SPAN style="font-size:12pt;">>> RequestHeader set X_FORWARDED_PROTO ''https'' to my .conf file, but that</SPAN></div> > <div><SPAN style="font-size:12pt;">>> makes apache barf.</SPAN></div> > <div><SPAN style="font-size:12pt;">>></SPAN></div> > <div><SPAN style="font-size:12pt;">>></SPAN></div> > <div><SPAN style="font-size:12pt;">>> Patrick Berry < pberry at gmail.com> wrote:></SPAN></div> > <div><SPAN style="font-size:12pt;">>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>> On 3/16/07, magic hat <magic_hat60622 at yahoo.com> wrote:> I need to</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> deploy an app that requires SSL on a linux/apache 2.0 server that cannot</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> be upgraded to apache 2.2.</SPAN></div> > <div><SPAN style="font-size:12pt;">>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>>> I''m a bit concerned that using pound and avoiding apache entirely will</SPAN></div> > <div><SPAN style="font-size:12pt;">>>>> mess up my Plesk setup, but I''m willing to take a gamble on that, or</SPAN></div> > <div><SPAN style="font-size:12pt;">>>>> any other approach that someone''s found effective. Suggestions?</SPAN></div> > <div><SPAN style="font-size:12pt;">>>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>> This is entirely doable (as we have just that very setup in production</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> right now).  I have a page for the docs site into Zed for review that</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> details the steps (sans SSL, but that''s just apache config).  The key to</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> the whole thing is from this article (previously posted on the list):</SPAN></div> > <div><SPAN style="font-size:12pt;">>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>> <a href="http://times.usefulinc.com/2006/09/13-mongrel-apache20">http://times.usefulinc.com/2006/09/13-mongrel-apache20</a></SPAN></div> > <div><SPAN style="font-size:12pt;">>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>> I would also recommend using the latest pre-release mongrel_cluster, as</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> there are just too many good features in there to not use it.</SPAN></div> > <div><SPAN style="font-size:12pt;">>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>> Pat</SPAN></div> > <div><SPAN style="font-size:12pt;">>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>></SPAN></div> > <div><SPAN style="font-size:12pt;">>>> _______________________________________________ Mongrel-users mailing</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> list Mongrel-users at rubyforge.org</SPAN></div> > <div><SPAN style="font-size:12pt;">>>> <a href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users</a></SPAN></div> > <div><SPAN style="font-size:12pt;">>></SPAN></div> > <div><SPAN style="font-size:12pt;">>></SPAN></div> > <div><SPAN style="font-size:12pt;">>> Bored stiff? Loosen up...</SPAN></div> > <div><SPAN style="font-size:12pt;">>> Download and play hundreds of games for free on Yahoo! Games.</SPAN></div> > <div><SPAN style="font-size:12pt;">>></SPAN></div> > <div><SPAN style="font-size:12pt;">>></SPAN></div> > <div><SPAN style="font-size:12pt;">>> _______________________________________________</SPAN></div> > <div><SPAN style="font-size:12pt;">>> Mongrel-users mailing list</SPAN></div> > <div><SPAN style="font-size:12pt;">>> Mongrel-users at rubyforge.org</SPAN></div> > <div><SPAN style="font-size:12pt;">>> <a href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users</a></SPAN></div> > </body></html>> _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users- -- nathan nathan_at_nathanpowell_dot_org The longer I live the more I see that I am never wrong about anything, and that all the pains I have so humbly taken to verify my notions have only wasted my time. ~ George Bernard Shaw - ------------------------------------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF/K1fv3H2lx1re5YRAhU7AJ9EljzLzhbtsHJhnwe9wcPS9b9lWACfRsn1 t03/HE5uFzkYytwy+/BPXBQ=6kSZ -----END PGP SIGNATURE-----
On 3/17/07, Bill Tribley <bill at tribley.org> wrote:> > Apache 2.0 is a real dog, 2.2 is a whole lot better. Is politics or risk the > reason for no upgrade? If so, you should consider the stability and security > factors. I would strongly recommend against running Apache 2.0 in production > when 2.2 is available.Can you explain this some more? I know 2.2 has mod_proxy_balancer and some other new modules that everyone likes, but are you referring to major improvements to the core codebase improving a lot between 2.0 -> 2.2? - Rob
Hi Rob, I tried to use 2.0 several times from 2002 - 2005 . I had problems with file uploads, integrating programs like Tomcat was really hard, in general my <limited> experience indicated that 2.0 was a great thing for Windows but not so hot for Linux. 2.2 was a major overhaul from what I understand. I wrote to the Apache mailing list about my problems after trying to upgrade from 1.3 to 2.0.47 (should be mature, right!) and got a flame reply that could be distilled to "you idiot, why don''t you just upgrade to the latest version and write again", after which I downgraded to the latest 1.3.xx release and stayed there (my passion is not to tinker with my system, I expect the core components to just work without me becoming expert in them). Then early in 2006 I discovered that 2.2 had been released. This version is really stable, it had none of the issues I had seen with 2.0 and it offered easy Tomcat integration that worked as advertised without the mod_jk nightmare of 1.3 and 2.0 . So, I was sold. The thing was also faster on my machine (an old/slow P3) than 1.3 . It is a real speed demon on my latest server which is an older 1.9gHz P4 with 1Gb RAM. From what I can see, if you want to run the best, stable version of 2.x it is 2.2.x, not 2.0x. You should not have issues upgrading, as long as you follow all the directions and compile from source. I don''t trust any of the binaries floating around, in my opinion perl or apache should be compiled from source. These packages typically compile on almost any machine, very often the available rpms or other packaged binary distros are old. All the Ruby docs I have seen show a cluster of Mongrels proxied by Apache 2.2 . The main Ruby site is running 2.0.something, but rumor has it that it was not easy to get it all to work. The published Mongrel articles all refer to 2.2 . 2.2 is stable, why waste time on an outdated version? Bill On Sat, 17 Mar 2007 22:23:15 -0500, Rob Sanheim wrote:> On 3/17/07, Bill Tribley <bill at tribley.org> wrote: > >> Apache 2.0 is a real dog, 2.2 is a whole lot better. Is politics or risk >> the reason for no upgrade? If so, you should consider the stability and >> security factors. I would strongly recommend against running Apache 2.0 in >> production when 2.2 is available. >> > > Can you explain this some more? I know 2.2 has mod_proxy_balancer and some > other new modules that everyone likes, but are you referring to major > improvements to the core codebase improving a lot between 2.0 -> 2.2? > > - Rob > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > ** Classified by CRM114 SS as good ** > CLASSIFY fails; success probability: 0.0024 pR: -2.6152 > Best match to file #1 (nonspam.css) prob: 0.9976 pR: 2.6152 Total features > in input file: 2254 > #0 (spam.css): features: 1618819, hits: 46901, prob: 2.42e-03, pR: -2.62 #1 > (nonspam.css): features: 1618667, hits: 41575, prob: 9.98e-01, pR: 2.62