Re: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster
Hi! On Thu, Aug 10, 2006 at 10:25:13AM -0700, HH wrote: Howdy, I am using Apache 2.2 and Mongrel with great success. I have a mod_rewrite question and I am NO expert. I think it's really simple but I haven't nailed it. I was hoping someone here could help. I'm using Apache conf right out of the cluster example from the Mongrel site. I couldn't find that, so I'm assuming your rewrite rules look like this: RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule .* balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] I have a directory under my apps 'public' directory called 'sendto'. Files in that directory are accessible but I want to be able to provide a directory listing for when no specific file is requested. Right now, it seems that the requests to http://domain.com/sendto/ are being sent to the cluster. I am looking for a rewrite statement that basically tells Apache not to send that specific URL pattern to the cluster. to achiee this, just add another RewriteCond line: RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/sendto RewriteRule .* balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] this excludes requests pointing to URIs starting with /sendto from being sent via the balancer. Instead these requests will be served by Apache, and directory listings can be allowed with something like Directory /path/to/public/sendto Options Indexes /Directory hth, Jens -- webit! Gesellschaft für neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Krämer [EMAIL PROTECTED] Schnorrstraße 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
[Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster
Howdy, I am using Apache 2.2 and Mongrel with great success. I have a mod_rewrite question and I am NO expert. I think it's really simple but I haven't nailed it. I was hoping someone here could help. I'm using Apache conf right out of the cluster example from the Mongrel site. I have a directory under my apps 'public' directory called 'sendto'. Files in that directory are accessible but I want to be able to provide a directory listing for when no specific file is requested. Right now, it seems that the requests to http://domain.com/sendto/ are being sent to the cluster. I am looking for a rewrite statement that basically tells Apache not to send that specific URL pattern to the cluster. Can anyone help? Hunter ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster
Thanks, that's what I'm going for but just like you, not good enough to get there. Been messing with the docs for the past hour and no luck yet. I was hoping a guru could lend a hand. From: Philip Hallstrom [EMAIL PROTECTED] Reply-To: mongrel-users@rubyforge.org Date: Thu, 10 Aug 2006 12:56:28 -0500 (CDT) To: Mongrel mongrel-users@rubyforge.org Subject: Re: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster Howdy, I am using Apache 2.2 and Mongrel with great success. I have a mod_rewrite question and I am NO expert. I think it's really simple but I haven't nailed it. I was hoping someone here could help. I'm using Apache conf right out of the cluster example from the Mongrel site. I have a directory under my apps 'public' directory called 'sendto'. Files in that directory are accessible but I want to be able to provide a directory listing for when no specific file is requested. Right now, it seems that the requests to http://domain.com/sendto/ are being sent to the cluster. I am looking for a rewrite statement that basically tells Apache not to send that specific URL pattern to the cluster. Add a rewrite condition to the rule that sends things to the cluster saying that if the url matches this, that's false so bail... I'm not good enough to write out the rule on the fly, but the docs should get you there ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster
Thanks, that's what I'm going for but just like you, not good enough to get there. Been messing with the docs for the past hour and no luck yet. I was hoping a guru could lend a hand. Turn up the log level for rewrite and watch it... that helps a lot when futzing with those things... From: Philip Hallstrom [EMAIL PROTECTED] Reply-To: mongrel-users@rubyforge.org Date: Thu, 10 Aug 2006 12:56:28 -0500 (CDT) To: Mongrel mongrel-users@rubyforge.org Subject: Re: [Mongrel] Telling Apache Not to Send a Sub-Directory to the Cluster Howdy, I am using Apache 2.2 and Mongrel with great success. I have a mod_rewrite question and I am NO expert. I think it's really simple but I haven't nailed it. I was hoping someone here could help. I'm using Apache conf right out of the cluster example from the Mongrel site. I have a directory under my apps 'public' directory called 'sendto'. Files in that directory are accessible but I want to be able to provide a directory listing for when no specific file is requested. Right now, it seems that the requests to http://domain.com/sendto/ are being sent to the cluster. I am looking for a rewrite statement that basically tells Apache not to send that specific URL pattern to the cluster. Add a rewrite condition to the rule that sends things to the cluster saying that if the url matches this, that's false so bail... I'm not good enough to write out the rule on the fly, but the docs should get you there ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users