From carterdavid@example.net Sun Nov 01 01:42:56 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 34884 invoked from network); 1 Nov 2009 01:42:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 01:42:56 -0000 Received: (qmail 84710 invoked by uid 500); 1 Nov 2009 01:42:53 -0000 Delivered-To: carterdavid@example.net Received: (qmail 84663 invoked by uid 500); 1 Nov 2009 01:42:52 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 84654 invoked by uid 99); 1 Nov 2009 01:42:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 01:42:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of carterdavid@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-bw0-f221.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 01:42:42 +0000 Received: by bwz21 with SMTP id 21so4939101bwz.24 for <carterdavid@example.net>; Sat, 31 Oct 2009 18:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=72ZBvDPtqfbUPSgbNorWfE06/zUdzN7F8g8uPz0UfEA=; b=pVwRaRNQQ5CROFHma9RwSFkfTDcrQD+ue0CbYYu6/+MRTWZGCsUrsqsv5JzjdeWVK+ AyiTQGPUKoKJA/PZyD8P4+LdX2a6bYyDR3ugo9udroSH3NoLAstHjZvgXktJKZBNqx34 EhnyQRR1SZFGnwjWatuyLCRvUCEoNLsgZoOr0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=Xs+Ar7TAEIyW4w9cF1DKtI+ThZYgNVxpPleBsZx+9tZ67KwwG/H0RJWV2w1kSKkToP /skFbbsSJOsFVbOEJaHWhy1D63iZXgUxO0r53phIhSSpGsdHtjrrL3+deBqGRDiPYCOB 9ScfFOyttxRZaTYUO51KC7cosWlTVXH5Z+pGw= MIME-Version: 1.0 Sender: carterdavid@example.net Received: by 83.161.120.155 with SMTP id r17mr2545369bkr.41.1257039742122; Sat, 31 Oct 2009 18:42:22 -0700 (PDT) From: Brian Mearns <carterdavid@example.net> Date: Sat, 31 Oct 2009 21:42:02 -0400 X-Google-Sender-Auth: 211501a03a83f9fe Message-ID: <carterdavid@example.net> To: carterdavid@example.net Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Limit output filter by response code I'm using external filters to minify javascript and CSS files as they head out of the server. The minifier takes a good 500ms to run, causing serious drag. So I put Squid in front of the server and configured it as a caching proxy. The problem is, the filters are running even on "304 Not Modified" responses, meaning there isn't actually any content to minify. So I want to be able to configure whether or not the filter is used based on the response code. Is this possible? Alternatively, if I can access the response code in the ext filter (as an env var or command line parameter, for instance), then I can make the decision there. Any help would be really great. Thanks, -Brian -- Feel free to contact me using PGP Encryption: Key Id: 0x3AA70848 Available from: http://keys.gnupg.net --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net " from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net From carterdavid@example.net Sun Nov 01 14:59:18 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 32660 invoked from network); 1 Nov 2009 14:59:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 14:59:17 -0000 Received: (qmail 66848 invoked by uid 500); 1 Nov 2009 14:59:14 -0000 Delivered-To: carterdavid@example.net Received: (qmail 66785 invoked by uid 500); 1 Nov 2009 14:59:13 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 66776 invoked by uid 99); 1 Nov 2009 14:59:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 14:59:13 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of carterdavid@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-qy0-f177.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 14:59:05 +0000 Received: by qyk7 with SMTP id 7so2075444qyk.10 for <carterdavid@example.net>; Sun, 01 Nov 2009 06:58:44 -0800 (PST) MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id l34mr552675qck.96.1257087524180; Sun, 01 Nov 2009 06:58:44 -0800 (PST) In-Reply-To: <carterdavid@example.net> References: <carterdavid@example.net> <carterdavid@example.net> Date: Sun, 1 Nov 2009 11:58:44 -0300 Message-ID: <carterdavid@example.net> From: Damian Traverso <carterdavid@example.net> To: carterdavid@example.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] mod_proxy_ajp (2.2.13) + Tomcat 6.0.20 - APR does not understand this error code: proxy: read response failed Hi, first of all, thanks for your answer. And about the error, I also thought that could be the problem, but the thing is when that error is logged on Apache, the Tomcat instances are NOT using their MaxThreads capabilities. Another issue we have is that, when this problem appears, the processing threads on Tomcat start taking longer responses than regular usage. Thanks again, -Damian On Sat, Oct 31, 2009 at 7:46 PM, Andr=E9 Warnier <carterdavid@example.net> wrote: > Damian Traverso wrote: >> >> Hi, >> we have one Apache-2.2.13 running mod_proxy_ajp + mod_proxy_balancer, >> connected to (3) Tomcat-6.0.20 instances under Fedora release 8. We >> are experiencing some issues with high CPU load on the Tomcat side, >> and Apache starts logging errors like these >> >> [Fri Oct 30 14:47:43 2009] [error] (70007)The timeout specified has >> expired: ajp_ilink_receive() can't receive header >> [Fri Oct 30 14:47:43 2009] [error] ajp_read_header: ajp_ilink_receive >> failed >> [Fri Oct 30 14:47:43 2009] [error] (120006)APR does not understand >> this error code: proxy: read response failed from >> >> On Tomcat side we are using the APR Native Connector, with this settings= : >> >> =A0<Connector port=3D"8009" protocol=3D"AJP/1.3" redirectPort=3D"8443" >> maxThreads=3D"130" backlog=3D"10" connectionTimeout=3D"30000" >> keepAliveTimeout=3D"30000" enableLookups=3D"false" /> >> >> Apache MPM conf: >> >> ServerLimit 100 >> <IfModule mpm_worker_module> >> =A0 StartServers =A0 =A0 =A0 =A0 30 >> =A0 MaxClients =A0 =A0 =A0 =A0 2500 >> =A0 MinSpareThreads =A0 =A0 =A050 >> =A0 MaxSpareThreads =A0 =A0 100 >> =A0 ThreadsPerChild =A0 =A0 =A025 >> =A0 MaxRequestsPerChild =A0 0 >> </IfModule> >> >> mod_proxy_ajp conf: >> >> <Proxy balancer://jogacraque> >> =A0 BalancerMember ajp://xxx.xxx.xxx.xxx:8009 route=3Dapp01 ttl=3D30 max= =3D2 >> =A0 BalancerMember ajp://xxx.xxx.xxx.xxx:8009 route=3Dapp02 ttl=3D30 max= =3D2 >> =A0 BalancerMember ajp://xxx.xxx.xxx.xxx:8009 route=3Dapp03 ttl=3D30 max= =3D2 >> </Proxy> >> >> Apache specs: >> >> Server version: Apache/2.2.13 (Unix) >> Server built: =A0 Sep 29 2009 11:12:35 >> Server's Module Magic Number: 20051115:23 >> Server loaded: =A0APR 1.3.8, APR-Util 1.3.9 >> Compiled using: APR 1.3.8, APR-Util 1.3.9 >> Architecture: =A0 32-bit >> Server MPM: =A0 =A0 Worker >> =A0threaded: =A0 =A0 yes (fixed thread count) >> =A0forked: =A0 =A0 yes (variable process count) >> >> >> I've beeng testing different settings for mod_proxy_ajp, but I am not >> sure what is the exact relation between the max option for mod_proxy >> and ThreadsPerChild. Should I set max to 1? I understand I would have >> as many connections to each Tomcat box as >> max*(MaxClients/ThreadsPerChild), is this correct? >> >> BTW, is the total number of connections that mod_proxy_ajp will >> forward to Tomcat related with MaxThreads ? I don't fully understand >> how APR connector works in this case. >> > Hi. > No great specialist here, but I'll go by the numbers above and give you m= y > interpretation. > > MaxClients 2500 > on your webserver/balancer indicates how many requests you are willing to > accept and process at the same time, at the Apache level. > ThreadsPerChild 25 > means that, if you ever reach these 2500 simultaneous requests, Apache wi= ll > create 100 children processes to handle them, since each child is limited= to > 25 threads, and 2500 / 25 threads -> 100 children. > (Which seems to match the ServerLimit. Good.) > > It is so with the mod_jk connector, and probably also with mod_proy_ajp, > that the connector will automatically calculate how many connections to m= ake > to Tomcat, based on the number of threads/processes above. > > At the Tomcat level, the AJP Connector says > maxThreads=3D"130" > and you have 3 Tomcats, thus for a total maximum number of threads of 130= X > 3 =3D 390. > One Tomcat thread processes one request at a time. > So the Tomcats, together, can process 390 requests at a time. > > There seems to be a mismatch between the number of requests you accept in > Apache (2500), and the number of threads available to process them in Tom= cat > (390). At the limit, you could have 390 requests being processed in Tomca= t, > and 2110 waiting to get a free Tomcat thread. > > That is probably what you are seeing with this log message : >> [Fri Oct 30 14:47:43 2009] [error] (70007)The timeout specified has >> expired: ajp_ilink_receive() can't receive header > > In other words, probably Apache/mod_proy_ajp got tired of waiting. > > On the other hand, you indicate that the poor Tomcats are already struggl= ing > to cope with the load. =A0Increasing their number of threads is thus unli= kely > to help much. > So it looks like you need more Tomcats. > Or else reduce the MaxClients in Apache. > Or optimise your Tomcat webapps. > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project= . > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: carterdavid@example.net > =A0" =A0 from the digest: carterdavid@example.net > For additional commands, e-mail: carterdavid@example.net > > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net " from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net From carterdavid@example.net Sun Nov 01 15:51:15 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 43051 invoked from network); 1 Nov 2009 15:51:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 15:51:15 -0000 Received: (qmail 90878 invoked by uid 500); 1 Nov 2009 15:51:12 -0000 Delivered-To: carterdavid@example.net Received: (qmail 90837 invoked by uid 500); 1 Nov 2009 15:51:11 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 90828 invoked by uid 99); 1 Nov 2009 15:51:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 15:51:11 +0000 X-ASF-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO web51704.mail.re2.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 01 Nov 2009 15:51:09 +0000 Received: (qmail 87732 invoked by uid 60001); 1 Nov 2009 15:50:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1257090648; bh=sEWNYldbmzIgVJ/qvTNedOEVvXkHGpuKOWIbbdqmx8U=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=dYrFB29CqIhLlqDHB7lm1hUfMOA8/uJALHZJqRsgKJ1KSSFaW6Hflsl8sdYTzOD0xuieWezAZN9uGh5ijnPj02akxh/dXR2RFp2kUamlnYONWtIcGzdkVIA4JKcAoJPQkhp9G6AkPIAju4gYUuX6KYoWM2pWdPefHsU7NopuO9A= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=E4d9uSNte6nzOPhpQXs+TttXd9pgfZqIYuOytOi1J1Pyt/K6y84Gd1tPZRg8y2xIwks5ubeuqeW/Wdnklfzbo4mNIRIBaJ2GAC1ntl7oiTwZJCT1dEkHXruRFk3+pI2DDrIYGxLgS5e+Wc447s/iI5gRd4ZLhF3AHS4ytgVGWKE=; Message-ID: <carterdavid@example.net> X-YMail-OSG: MVTyQjkVM1mwqoOYVAck2t0c6_bwFxGZRdJ.QEVUjBDd5J7hhxQ1zOfrrUKrRHLblQEWT4pZNCwm1otGzt4EOiYZQ6Uq2GyWVp1MtxR40d.QHWr44Tv06ARG31zV74UYNE72i17jkwwwI5waomVp6MuoN8mWb768733UVYgj6WAAMYLQQfnV3.UT9zTsfarM4W9PypXQ_7XVIJTW.SggsSprvKIM2aNwPG1atKeogKxdef8YVMlU3x0daZgZG8VsGh._j_17ETVxCE9lLoLKzF_0QWFWaSDbfiitCRbsAjWMxkHUHNOMlpLrwtzoO9446dg.k5MY.vXMlXW.U4t5M00Kt1m55kiaE0aU18ymgwP3z2_zSQmEKg.56POffojueqAdb1L6VlVeMtxOXd1gB9RrAI4wZoMIHwTAoaEkoHhdV56sGyTBAgSuPT.RsV7jREhCJ5U1JOHv0ALr2oDzFy88luT3jngjFxg- Received: from [83.161.120.155] by web51704.mail.re2.yahoo.com via HTTP; Sun, 01 Nov 2009 07:50:47 PST X-Mailer: YahooMailClassic/7.0.14 YahooMailWebService/0.7.361.4 Date: Sun, 1 Nov 2009 07:50:47 -0800 (PST) From: Andrei Iarus <carterdavid@example.net> To: carterdavid@example.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1071928430-1257090647=:87716" Subject: [users@httpd] mod_rewrite and setenv --0-1071928430-1257090647=:87716 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello, =A0 I have looked a lot in Internet, and found many people complaining about th= e same problem, with no normal answer. =A0 My problem: mod_rewrite with its RewriteCond %{ENV:variable} form cannot read correctly= the environment variables. =A0 The variable is set directly in the .htaccess OR in the main httpd.conf. No= matter, the variable won't be read. THe logging of the rewrite process wil= l show that the value of %{ENV:variable} will be "". =A0 I have found the same problem posted 5 years ago, with no answer, which is = awkward (if this is a bug). =A0 What I wrote was: =A0 SetEnv APPLICATION_ENV development =A0 RewriteCond %{ENV:APPLICATION_ENV} ^development$ RewriteRule ^.*$ /XXX/index.php [NC,L] =A0 Unfortunately, it doesnt work. Any experience with that? Where should I com= plain further?=0A=0A=0A --0-1071928430-1257090647=:87716 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" ><tr><td valign=3D"= top" style=3D"font: inherit;"><DIV>Hello,</DIV> <DIV>&nbsp;</DIV> <DIV>I have looked a lot in Internet, and found many people complaining abo= ut the same problem, with no normal answer.</DIV> <DIV>&nbsp;</DIV> <DIV>My problem:</DIV> <DIV>mod_rewrite with its RewriteCond %{ENV:variable} form cannot read corr= ectly the environment variables.</DIV> <DIV>&nbsp;</DIV> <DIV>The variable is set directly in the .htaccess OR in the main httpd.con= f. No matter, the variable won't be read. THe logging of the rewrite proces= s will show that the value of %{ENV:variable} will be "".</DIV> <DIV>&nbsp;</DIV> <DIV>I have found the same problem posted 5 years ago, with no answer, whic= h is awkward (if this is a bug).</DIV> <DIV>&nbsp;</DIV> <DIV>What I wrote was:</DIV> <DIV>&nbsp;</DIV> <DIV>SetEnv APPLICATION_ENV development</DIV> <DIV>&nbsp;</DIV> <DIV>RewriteCond %{ENV:APPLICATION_ENV} ^development$<BR>RewriteRule ^.*$ /= XXX/index.php [NC,L]</DIV> <DIV>&nbsp;</DIV> <DIV>Unfortunately, it doesnt work. Any experience with that? Where should = I complain further?</DIV></td></tr></table><br>=0A=0A --0-1071928430-1257090647=:87716-- From carterdavid@example.net Sun Nov 01 16:11:29 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 46073 invoked from network); 1 Nov 2009 16:11:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 16:11:29 -0000 Received: (qmail 3366 invoked by uid 500); 1 Nov 2009 16:11:25 -0000 Delivered-To: carterdavid@example.net Received: (qmail 3291 invoked by uid 500); 1 Nov 2009 16:11:25 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 3282 invoked by uid 99); 1 Nov 2009 16:11:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 16:11:25 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of carterdavid@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-yx0-f189.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 16:11:16 +0000 Received: by yxe27 with SMTP id 27so4082438yxe.10 for <carterdavid@example.net>; Sun, 01 Nov 2009 08:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Yp5qu1xMik3php2qCTaohLiepP5qMxBwMVaISsxdKuE=; b=kyQgQcm+Vq0xMjuI7oxVGIcneOp8caUmJIjrYZBw9bpA4W1TvcDWVCmCc/v8na02h6 aqDYzCRgt3Bv3SP5snx0Iks7WjE2NHsTlVu3Dpo4LeB30oUK6JJ9xqx520IAovWTKj0/ BIPWyeprUqdO33SWizp7G3lCzyZyEYcp56Uys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gvLPW+J9ByFFGjuY/O8bKFj3P+DMgEv4CZW4Oi2hfS932XnEBtOFqXjONhJXY6R68e btwzIe+EFAVgtcWrQakPLrd7g0RQe5rcSITPzNJhl9BOcd4XaMVAlwn7J0swWTyTw1VD KoOC4eJNE57nbL3w+OKQNH+MDnoQtaQSS1xI8= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id g4mr6493752ybf.313.1257091856035; Sun, 01 Nov 2009 08:10:56 -0800 (PST) In-Reply-To: <carterdavid@example.net> References: <carterdavid@example.net> Date: Sun, 1 Nov 2009 11:10:55 -0500 Message-ID: <carterdavid@example.net> From: Eric Covener <carterdavid@example.net> To: carterdavid@example.net Content-Type: multipart/alternative; boundary=000e0cd6a75887708e0477518118 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] mod_rewrite and setenv --000e0cd6a75887708e0477518118 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Nov 1, 2009 at 10:50 AM, Andrei Iarus <carterdavid@example.net> wrote: > Hello, > > I have looked a lot in Internet, and found many people complaining about > the same problem, with no normal answer. > > My problem: > mod_rewrite with its RewriteCond %{ENV:variable} form cannot read correctly > the environment variables. > > The variable is set directly in the .htaccess OR in the main httpd.conf. No > matter, the variable won't be read. THe logging of the rewrite process will > show that the value of %{ENV:variable} will be "". > > I have found the same problem posted 5 years ago, with no answer, which is > awkward (if this is a bug). > > What I wrote was: > > SetEnv APPLICATION_ENV development > > RewriteCond %{ENV:APPLICATION_ENV} ^development$ > RewriteRule ^.*$ /XXX/index.php [NC,L] > > Unfortunately, it doesnt work. Any experience with that? Where should I > complain further? > > Variables set by SetEnvIf are set earlier than those by SetEnv. Does that resolve your problem? -- Eric Covener carterdavid@example.net --000e0cd6a75887708e0477518118 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">On Sun, Nov 1, 2009 at 10:50 AM, Andrei Iarus <s= pan dir=3D"ltr">&lt;<a href=3D"mailto:carterdavid@example.net">carterdavid@example.net= m</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"borde= r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le= ft: 1ex;"> <table border=3D"0" cellpadding=3D"0" cellspacing=3D"0"><tbody><tr><td styl= e=3D"font-family: inherit; font-style: inherit; font-variant: inherit; font= -weight: inherit; font-size: inherit; line-height: inherit; font-size-adjus= t: inherit; font-stretch: inherit;" valign=3D"top"> <div>Hello,</div> <div>=A0</div> <div>I have looked a lot in Internet, and found many people complaining abo= ut the same problem, with no normal answer.</div> <div>=A0</div> <div>My problem:</div> <div>mod_rewrite with its RewriteCond %{ENV:variable} form cannot read corr= ectly the environment variables.</div> <div>=A0</div> <div>The variable is set directly in the .htaccess OR in the main httpd.con= f. No matter, the variable won&#39;t be read. THe logging of the rewrite pr= ocess will show that the value of %{ENV:variable} will be &quot;&quot;.</di= v> <div>=A0</div> <div>I have found the same problem posted 5 years ago, with no answer, whic= h is awkward (if this is a bug).</div> <div>=A0</div> <div>What I wrote was:</div> <div>=A0</div> <div>SetEnv APPLICATION_ENV development</div> <div>=A0</div> <div>RewriteCond %{ENV:APPLICATION_ENV} ^development$<br>RewriteRule ^.*$ /= XXX/index.php [NC,L]</div> <div>=A0</div> <div>Unfortunately, it doesnt work. Any experience with that? Where should = I complain further?</div></td></tr></tbody></table><br> </blockquote></div><br>Variables set by SetEnvIf are set earlier than= those by SetEnv. Does that resolve your problem?<br><br>-- <br>Eric Covene= r<br><a href=3D"mailto:carterdavid@example.net">carterdavid@example.net</a><br> --000e0cd6a75887708e0477518118-- From carterdavid@example.net Sun Nov 01 16:17:40 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 47663 invoked from network); 1 Nov 2009 16:17:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 16:17:40 -0000 Received: (qmail 11039 invoked by uid 500); 1 Nov 2009 16:17:37 -0000 Delivered-To: carterdavid@example.net Received: (qmail 11003 invoked by uid 500); 1 Nov 2009 16:17:37 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 10992 invoked by uid 99); 1 Nov 2009 16:17:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 16:17:37 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO mail-bw0-f221.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 16:17:27 +0000 Received: by bwz21 with SMTP id 21so5337157bwz.24 for <carterdavid@example.net>; Sun, 01 Nov 2009 08:17:06 -0800 (PST) Received: by 83.161.120.155 with SMTP id p7mr3166656bkp.69.1257092226485; Sun, 01 Nov 2009 08:17:06 -0800 (PST) Received: from ?83.161.120.155? (74-140-242-92.dhcp.insightbb.com [83.161.120.155]) by mx.google.com with ESMTPS id 19sm4205973fkr.23.283.161.120.155.17.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 01 Nov 2009 08:17:05 -0800 (PST) Message-Id: <carterdavid@example.net> From: Rich Bowen <carterdavid@example.net> To: carterdavid@example.net In-Reply-To: <carterdavid@example.net> Content-Type: multipart/alternative; boundary=Apple-Mail-2--387851691 Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 1 Nov 2009 11:17:02 -0500 References: <carterdavid@example.net> X-Mailer: Apple Mail (2.936) X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] mod_rewrite and setenv --Apple-Mail-2--387851691 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Nov 1, 2009, at 10:50 , Andrei Iarus wrote: > Hello, > > I have looked a lot in Internet, and found many people complaining > about the same problem, with no normal answer. > > My problem: > mod_rewrite with its RewriteCond %{ENV:variable} form cannot read > correctly the environment variables. > > The variable is set directly in the .htaccess OR in the main > httpd.conf. No matter, the variable won't be read. THe logging of > the rewrite process will show that the value of %{ENV:variable} will > be "". > > I have found the same problem posted 5 years ago, with no answer, > which is awkward (if this is a bug). > > What I wrote was: > > SetEnv APPLICATION_ENV development > > RewriteCond %{ENV:APPLICATION_ENV} ^development$ > RewriteRule ^.*$ /XXX/index.php [NC,L] > > Unfortunately, it doesnt work. Any experience with that? Where > should I complain further? > This is a matter of order of processing. The rewrite directives run earlier than the SetEnv directives. You can set the env var with mod_rewrite: RewriteRule ^ - [E:APPLICATION_ENV=development] -- Rich Bowen carterdavid@example.net --Apple-Mail-2--387851691 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable <html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space; "><br><div><div>On Nov 1, 2009, = at 10:50 , Andrei Iarus wrote:</div><br = class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><table = cellspacing=3D"0" cellpadding=3D"0" border=3D"0" style=3D"position: = static; z-index: auto; "><tbody><tr><td valign=3D"top" style=3D"font: = inherit;"><div>Hello,</div> <div>&nbsp;</div> <div>I have looked a lot = in Internet, and found many people complaining about the same problem, = with no normal answer.</div> <div>&nbsp;</div> <div>My problem:</div> = <div>mod_rewrite with its RewriteCond %{ENV:variable} form cannot read = correctly the environment variables.</div> <div>&nbsp;</div> <div>The = variable is set directly in the .htaccess OR in the main httpd.conf. No = matter, the variable won't be read. THe logging of the rewrite process = will show that the value of %{ENV:variable} will be "".</div> = <div>&nbsp;</div> <div>I have found the same problem posted 5 years ago, = with no answer, which is awkward (if this is a bug).</div> = <div>&nbsp;</div> <div>What I wrote was:</div> <div>&nbsp;</div> = <div>SetEnv APPLICATION_ENV development</div> <div>&nbsp;</div> = <div>RewriteCond %{ENV:APPLICATION_ENV} ^development$<br>RewriteRule = ^.*$ /XXX/index.php [NC,L]</div> <div>&nbsp;</div> <div>Unfortunately, = it doesnt work. Any experience with that? Where should I complain = further?</div></td></tr></tbody></table><br> = </blockquote></div><div><br></div><div><br></div><div>This is a matter = of order of processing. The rewrite directives run earlier than the = SetEnv directives. You can set the env var with = mod_rewrite:</div><div><br></div><div>RewriteRule ^ - = [E:APPLICATION_ENV=3Ddevelopment]</div><br><div = apple-content-edited=3D"true"> <span class=3D"Apple-style-span" = style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = Helvetica; font-size: medium; font-style: normal; font-variant: normal; = font-weight: normal; letter-spacing: normal; line-height: normal; = orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; = white-space: normal; widows: 2; word-spacing: 0px; = -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: = 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: = break-word; -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space; "><div>--</div><div>Rich Bowen</div><div><a = href=3D"mailto:carterdavid@example.net">carterdavid@example.net</a></div><div><br></= div></div></span><br class=3D"Apple-interchange-newline"> = </div><br></body></html>= --Apple-Mail-2--387851691-- From carterdavid@example.net Sun Nov 01 17:15:30 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 58822 invoked from network); 1 Nov 2009 17:15:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 17:15:30 -0000 Received: (qmail 54531 invoked by uid 500); 1 Nov 2009 17:15:26 -0000 Delivered-To: carterdavid@example.net Received: (qmail 54455 invoked by uid 500); 1 Nov 2009 17:15:25 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 54446 invoked by uid 99); 1 Nov 2009 17:15:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 17:15:25 +0000 X-ASF-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO web51704.mail.re2.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 01 Nov 2009 17:15:20 +0000 Received: (qmail 28285 invoked by uid 60001); 1 Nov 2009 17:14:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1257095698; bh=nXaUPIjsYX2jc0vlu7LAUbLmjqswEhCCMbGrBT6xPPg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=gVnBfyD7BXETUEAJFLsIqUUREBufIvvIjIz/iDKySFua+tZwldAbz1/gEoZpM4LUofS3vXQmNZ7VH2iNFsHvNzzdXVw9wltVcoAnbYqwpvVviHKEgvB++OGhDPH8/LGCQYdm6UalQ+3V12PK8t5/pO+zrs3KNo8mTYAgczZdNy4= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=wFlZAoUHLUg8N6zF0EHa9QHlnDRAT7OuXIVdmLzAWIwcqjNnHLTtMNT1Qafv84eXiJAy/rYNvtnd9DlQGQJUXIUDBTCuQYoHZ5jy0V9KH6hqYnPyOfWhUTEFwx/FgaeHZSVwr9XSGIbS041iV5d+CjwPWN3XnMQ1VhDg+6v5dUw=; Message-ID: <carterdavid@example.net> X-YMail-OSG: sJJrIcUVM1mEd4SOOvt4ZIyReU0bSQTPG3KLUsYS60yYSloEzRCirk_CWidqmLWPREQSvrQBTIudk.T._DMQuxAAfEIxVcDwWfXNkt1Ch4ydDo28i03QAvFAhXtpwKHc_TQ6d3UZtVRvFuavhmnJQL_zQ5necpbZj7SNPTp6tsiBDrKfA.rA_bzaMSAvJCSlHI5WZTe1XlfRLsWFRJBZzTnRu7zVVghHX559T36dJ8x.7eBN3TsJnEknjCmEvox7Z0s01YTATWzDvd32Q4eoy6uyRx.hxgygU2ndvECvq1dWBQt5lAMRZZxIVtudI9b8S346dCQSlCUgLzai.7dM0JoYHPPlCSduakQS38j0qJ8mcPZ6evbBSN.T94iz_cUm6nB4irw5fZxFe_MEcjxVj483BDPsDrScsynqI6fiZU5n9PZ3..R0LhkWTLCPkhx0LzD3exXkjAE1mTVxzDvyFpDBEnG81lB62oizs1Um3nIjit6sI2E900Ycav59Husg0uK.khe3hlCnY6yjI95gUxqCwy4Qn21xLIYKpk.gOgb7bQN7F3.yxplVdcN29MFn0VjcZdBUTAISF3iPfY_Sif0WDV6.38YBDUyzJ4iLGEv5esT.FJg- Received: from [83.161.120.155] by web51704.mail.re2.yahoo.com via HTTP; Sun, 01 Nov 2009 09:14:58 PST X-Mailer: YahooMailClassic/7.0.14 YahooMailWebService/0.7.361.4 Date: Sun, 1 Nov 2009 09:14:58 -0800 (PST) From: Andrei Iarus <carterdavid@example.net> To: carterdavid@example.net In-Reply-To: <carterdavid@example.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1594853747-1257095698=:27765" Subject: Re: [users@httpd] mod_rewrite and setenv --0-1594853747-1257095698=:27765 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks very much for the fast responses. Can this info be added in the mod_= rewrite documentation, as this is very important for future questions? =A0 OR: can the order of processing be changed? --- On Sun, 11/1/09, Rich Bowen <carterdavid@example.net> wrote: From: Rich Bowen <carterdavid@example.net> Subject: Re: [users@httpd] mod_rewrite and setenv To: carterdavid@example.net Date: Sunday, November 1, 2009, 7:17 PM On Nov 1, 2009, at 10:50 , Andrei Iarus wrote: Hello, =A0 I have looked a lot in Internet, and found many people complaining about th= e same problem, with no normal answer. =A0 My problem: mod_rewrite with its RewriteCond %{ENV:variable} form cannot read correctly= the environment variables. =A0 The variable is set directly in the .htaccess OR in the main httpd.conf. No= matter, the variable won't be read. THe logging of the rewrite process wil= l show that the value of %{ENV:variable} will be "". =A0 I have found the same problem posted 5 years ago, with no answer, which is = awkward (if this is a bug). =A0 What I wrote was: =A0 SetEnv APPLICATION_ENV development =A0 RewriteCond %{ENV:APPLICATION_ENV} ^development$ RewriteRule ^.*$ /XXX/index.php [NC,L] =A0 Unfortunately, it doesnt work. Any experience with that? Where should I com= plain further? This is a matter of order of processing. The rewrite directives run earlier= than the SetEnv directives. You can set the env var with mod_rewrite: RewriteRule ^ - [E:APPLICATION_ENV=3Ddevelopment] -- Rich Bowen carterdavid@example.net =0A=0A=0A --0-1594853747-1257095698=:27765 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" ><tr><td valign=3D"= top" style=3D"font: inherit;"><DIV>Thanks very much for the fast responses.= Can this info be added in the mod_rewrite documentation, as this is very i= mportant for future questions?</DIV> <DIV>&nbsp;</DIV> <DIV>OR: can the order of processing be changed?<BR><BR>--- On <B>Sun, 11/1= /09, Rich Bowen <I>&lt;carterdavid@example.net&gt;</I></B> wrote:<BR></DIV> <BLOCKQUOTE style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(= 16,16,255) 2px solid"><BR>From: Rich Bowen &lt;carterdavid@example.net&gt;<BR>Su= bject: Re: [users@httpd] mod_rewrite and setenv<BR>To: carterdavid@example.net= rg<BR>Date: Sunday, November 1, 2009, 7:17 PM<BR><BR> <DIV id=3Dyiv1907281740><BR> <DIV> <DIV>On Nov 1, 2009, at 10:50 , Andrei Iarus wrote:</DIV><BR class=3DApple-= interchange-newline> <BLOCKQUOTE type=3D"cite"> <TABLE cellSpacing=3D0 cellPadding=3D0 border=3D0> <TBODY> <TR> <TD vAlign=3Dtop> <DIV>Hello,</DIV> <DIV>&nbsp;</DIV> <DIV>I have looked a lot in Internet, and found many people complaining abo= ut the same problem, with no normal answer.</DIV> <DIV>&nbsp;</DIV> <DIV>My problem:</DIV> <DIV>mod_rewrite with its RewriteCond %{ENV:variable} form cannot read corr= ectly the environment variables.</DIV> <DIV>&nbsp;</DIV> <DIV>The variable is set directly in the .htaccess OR in the main httpd.con= f. No matter, the variable won't be read. THe logging of the rewrite proces= s will show that the value of %{ENV:variable} will be "".</DIV> <DIV>&nbsp;</DIV> <DIV>I have found the same problem posted 5 years ago, with no answer, whic= h is awkward (if this is a bug).</DIV> <DIV>&nbsp;</DIV> <DIV>What I wrote was:</DIV> <DIV>&nbsp;</DIV> <DIV>SetEnv APPLICATION_ENV development</DIV> <DIV>&nbsp;</DIV> <DIV>RewriteCond %{ENV:APPLICATION_ENV} ^development$<BR>RewriteRule ^.*$ /= XXX/index.php [NC,L]</DIV> <DIV>&nbsp;</DIV> <DIV>Unfortunately, it doesnt work. Any experience with that? Where should = I complain further?</DIV></TD></TR></TBODY></TABLE><BR></BLOCKQUOTE></DIV> <DIV><BR></DIV> <DIV><BR></DIV> <DIV>This is a matter of order of processing. The rewrite directives run ea= rlier than the SetEnv directives. You can set the env var with mod_rewrite:= </DIV> <DIV><BR></DIV> <DIV>RewriteRule ^ - [E:APPLICATION_ENV=3Ddevelopment]</DIV><BR> <DIV><SPAN class=3DApple-style-span style=3D"WORD-SPACING: 0px; FONT: mediu= m Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHI= TE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphan= s: 2; widows: 2"> <DIV style=3D"WORD-WRAP: break-word"> <DIV>--</DIV> <DIV>Rich Bowen</DIV> <DIV><A href=3D"http://us.mc517.mail.yahoo.com/mc/compose?to=3Drbowen@rcbow= en.com" target=3D_blank rel=3Dnofollow ymailto=3D"mailto:carterdavid@example.net= ">carterdavid@example.net</A></DIV> <DIV><BR></DIV></DIV></SPAN><BR class=3DApple-interchange-newline></DIV><BR= ></DIV></BLOCKQUOTE></td></tr></table><br>=0A=0A --0-1594853747-1257095698=:27765-- From carterdavid@example.net Sun Nov 01 19:36:54 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 90630 invoked from network); 1 Nov 2009 19:36:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 19:36:54 -0000 Received: (qmail 31802 invoked by uid 500); 1 Nov 2009 19:36:51 -0000 Delivered-To: carterdavid@example.net Received: (qmail 31726 invoked by uid 500); 1 Nov 2009 19:36:50 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 31717 invoked by uid 99); 1 Nov 2009 19:36:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 19:36:50 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carterdavid@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO tor.combios.es) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 19:36:48 +0000 Received: from localhost (localhost [83.161.120.155]) by tor.combios.es (Postfix) with ESMTP id 4B02322609C for <carterdavid@example.net>; Sun, 1 Nov 2009 20:36:26 +0100 (CET) Received: from tor.combios.es ([83.161.120.155]) by localhost (tor.combios.es [83.161.120.155]) (amavisd-new, port 10024) with ESMTP id OOPbgDB-izFZ for <carterdavid@example.net>; Sun, 1 Nov 2009 20:36:26 +0100 (CET) Received: from [83.161.120.155] (p549EB295.dip0.t-ipconnect.de [83.161.120.155]) by tor.combios.es (Postfix) with ESMTPA id F231222609B for <carterdavid@example.net>; Sun, 1 Nov 2009 20:36:25 +0100 (CET) Message-ID: <carterdavid@example.net> Date: Sun, 01 Nov 2009 20:36:12 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= <carterdavid@example.net> Reply-To: carterdavid@example.net User-Agent: Thunderbird 83.161.120.155 (Windows/20090812) MIME-Version: 1.0 To: carterdavid@example.net References: <carterdavid@example.net> In-Reply-To: <carterdavid@example.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [users@httpd] mod_rewrite and setenv Andrei Iarus wrote: > Thanks very much for the fast responses. Can this info be added in the mod_rewrite documentation, as this is very important for future questions? > It's already there, see : http://httpd.apache.org/docs/2.2/env.html Some Caveats > OR: can the order of processing be changed? > Are you kidding ? --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net " from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net From carterdavid@example.net Sun Nov 01 20:01:14 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 93187 invoked from network); 1 Nov 2009 20:01:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 20:01:14 -0000 Received: (qmail 39252 invoked by uid 500); 1 Nov 2009 20:01:11 -0000 Delivered-To: carterdavid@example.net Received: (qmail 39209 invoked by uid 500); 1 Nov 2009 20:01:11 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 39200 invoked by uid 99); 1 Nov 2009 20:01:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 20:01:11 +0000 X-ASF-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO viefep11-int.chello.at) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 20:01:08 +0000 Received: from edge03.upc.biz ([83.161.120.155]) by viefep11-int.chello.at (InterMail vM.83.161.120.155 201-2219-108-20080618) with ESMTP id <carterdavid@example.net> for <carterdavid@example.net>; Sun, 1 Nov 2009 21:00:45 +0100 Received: from mola.mine.nu ([83.161.120.155]) by edge03.upc.biz with edge id zw0i1c03o0W1Y6p03w0jSY; Sun, 01 Nov 2009 21:00:45 +0100 X-SourceIP: 83.161.120.155 Received: from localhost (localhost [83.161.120.155]) (uid 1001) by mola.mine.nu with local; Sun, 01 Nov 2009 21:00:42 +0100 id 0000000000E9CB6F.000000004AEDE8EA.00003701 Date: Sun, 1 Nov 2009 21:00:42 +0100 From: ivan <carterdavid@example.net> To: carterdavid@example.net Message-ID: <20091101200042.GC2710@mola> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [users@httpd] disable OutputBuffer filtering Hi, I want to have a directory with file serving throttled to emulate a slow connection for site debugging purposes. Is there an obvious solution i haven't thought about? This is what i managed to come up with so far: ExtFilterDefine slowdown mode=output cmd=/var/www/slow/slowCat preservescontentlength <Location /slow/> SetOutputFilter slowdown </Location> The slowCat is a short program (written in haskell) which disables buffering and pipes data from stdin to stdout, chracter by character, with a tiny sleep after each character. When i try it in the shell, it works just right. I would expect the server to send the data piecemeal to the client (and the client to parse the data node by node, web browsers do that), but what happens instead is a long delay and then the data arriving in a single burst. My conclusion is that apache is buffering the data somewhere. What am i doing wrond, is there any solution to this problem? Any help much appreciated Ivan Vadovic The slowCat appears to work right and looks like this: import System.Posix import System.IO import System.IO.Error main 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 IO () main = do hSetBuffering stdout NoBuffering hSetBuffering stdin NoBuffering try copy return () copy 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4 IO () copy = getChar >>= putChar >> usleep (10 ^ 4) >> copy --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net " from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net From carterdavid@example.net Sun Nov 01 20:02:29 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 93380 invoked from network); 1 Nov 2009 20:02:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2009 20:02:29 -0000 Received: (qmail 42024 invoked by uid 500); 1 Nov 2009 20:02:26 -0000 Delivered-To: carterdavid@example.net Received: (qmail 41962 invoked by uid 500); 1 Nov 2009 20:02:26 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 41953 invoked by uid 99); 1 Nov 2009 20:02:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 20:02:26 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carterdavid@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-qy0-f177.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 20:02:23 +0000 Received: by qyk7 with SMTP id 7so2134693qyk.10 for <carterdavid@example.net>; Sun, 01 Nov 2009 12:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=wLsU1n5QVNaEwhuSgj5yfG53UwA6OP0DrrNjD93Eqbo=; b=vPOC84LiGnrrSMmvgL/BdineKFBpatpwaylX4mUYCLqXhJo3qTEZTOqeQmvnSUvCO0 eV23zpRrm0oMvGDIXCTjad8GURGpbZO5x5os4MRI0elS0A7GElgFA/57aKY1Vy+tAayM xzdBeUhHeSTt3whM0dQjuQ4fcHMyv+fFMF7vc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DdCjyaK+vuemQMmEiTXE4PB/giQP6e/5wZadaRZwXcsWzMk8kNCwtVS7rXdfYAQwkg 2cdll74eD9flz5+68/9PObSsDbNKnIhmwHUk5uXdU8X9hp1KedVoJwVX7fRfSUpe0Cd6 FtebL80UAcPuNochV32oT8oMmBwKsWPSPsXX8= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id m9mr2383478qaq.319.1257105723002; Sun, 01 Nov 2009 12:02:03 -0800 (PST) In-Reply-To: <carterdavid@example.net> References: <carterdavid@example.net> <carterdavid@example.net> Date: Sun, 1 Nov 2009 15:02:02 -0500 Message-ID: <carterdavid@example.net> From: Eric Covener <carterdavid@example.net> To: carterdavid@example.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [users@httpd] mod_rewrite and setenv On Sun, Nov 1, 2009 at 2:36 PM, Andr=E9 Warnier <carterdavid@example.net> wrote: > Andrei Iarus wrote: >> >> Thanks very much for the fast responses. Can this info be added in the >> mod_rewrite documentation, as this is very important for future question= s? >> > > It's already there, see : > http://httpd.apache.org/docs/2.2/env.html > Some Caveats Added similar text to SetEnv today. --=20 Eric Covener carterdavid@example.net --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net " from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net From carterdavid@example.net Mon Nov 02 01:31:07 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 55213 invoked from network); 2 Nov 2009 01:31:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 01:31:07 -0000 Received: (qmail 22861 invoked by uid 500); 2 Nov 2009 01:31:03 -0000 Delivered-To: carterdavid@example.net Received: (qmail 22778 invoked by uid 500); 2 Nov 2009 01:31:02 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 22769 invoked by uid 99); 2 Nov 2009 01:31:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 01:31:02 +0000 X-ASF-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carterdavid@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-pz0-f201.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 01:30:56 +0000 Received: by pzk39 with SMTP id 39so2793518pzk.15 for <carterdavid@example.net>; Sun, 01 Nov 2009 17:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=7teFDppEPjVkWf8PLJajcy8rtDtN88L75WCVfVtlhTw=; b=xhnjCALnw2bcAlV/DCXgKfrD16J0ICLsPrrXM3owQ8f6RzWVVaz0Ws2W4I6xk41rH9 j0IB6vDm/op/W/O5eceqMYCuT9cKic1Zp5wxs5UJN+yPF18ZvqDbCET9OUetlZNumzkA RtbxeXWzh8I1X9HxIUd96u/ddb3b5l1parGFY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=K47Dv3j197H4CtV4wdT7EDGBeXl5PCszkdX+nDQQq0HRWGT07CRCS1rPqClCDGTJcc V/8adRFL48v4Id2PhG98XCr7BkP1QByzUrAj10jzJctmi5/a8nk/dorIhEHqeAezIBln UhdGxXy1x1EdJAuKKYlcuRk9t9KubCDAk3wb8= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id 3mr468031wfg.126.1257125436784; Sun, 01 Nov 2009 17:30:36 -0800 (PST) Date: Sun, 1 Nov 2009 17:30:36 -0800 Message-ID: <carterdavid@example.net> From: "carterdavid@example.net" <carterdavid@example.net> To: carterdavid@example.net Content-Type: multipart/alternative; boundary=00504502b08919020604775953f7 Subject: [users@httpd] Apache on F11. ANY APPROACH ?excluding images pdfs etc from Https ( ssl ) routing --00504502b08919020604775953f7 Content-Type: text/plain; charset=ISO-8859-1 Hi Folks - I am a squat on advanced Apache work. I would get a basic SSL functionality to work. So https://foobar.com works fine and gets me all the login windows I designed. however currently all the images and other extensions like .pdf are also using the https routing. some image referred on that https link e.g. https://foobar.com/loginhere.jpeg c can be displayed using https but not http I would like to JUST limit https usage to the login window html and ALL other images pdf's not secured html ( one that do not need password ) should use HTTP NOT HTTPS What I cannot really find ( and Apache modules make a graduate course , as I am realizing with all the futile digging in ) is HOW do I tell apache that if you find an image file ( .jpeg or .pdf ) if it comes to https convert all that into http .Has that something to do with rewrite or redirect modules . - Another thing is that http : // foobar.login.html should redirect to https : // foobar.login.html however http : // foobar.login.html will not show carterdavid@example.net. How do I achieve this . Thanks again --00504502b08919020604775953f7 Content-Type: text/html; charset=ISO-8859-1 Hi Folks<br><ul><li>I am a squat on advanced Apache work. I would get a basic SSL functionality to work. </li></ul> So <a href="https://foobar.com/" target="_blank">https://foobar.com</a> works fine and gets me all the login windows I designed. however currently all the images and other extensions like .pdf are also using the https routing. <br> some image referred on that https link <br> e.g. <a href="https://foobar.com/loginhere.jpeg" target="_blank">https://foobar.com/loginhere.jpeg</a> c<br> can be displayed using https but not http<br> I would like to JUST limit https usage to the login window html and ALL other images pdf&#39;s not secured html ( one that do not need password ) should use HTTP NOT HTTPS<br>What I cannot really find ( and Apache modules make a graduate course , as I am realizing with all the futile digging in ) is HOW do I tell apache that if you find an image file ( .jpeg or .pdf ) if it comes to https convert all that into http .Has that something to do with rewrite or redirect modules .<br><br><ul><li> Another thing is that http : // foobar.login.html should redirect to https : // foobar.login.html<br> however http : // foobar.login.html will not show carterdavid@example.net. How do I achieve this . <br> Thanks again</li></ul> --00504502b08919020604775953f7-- From carterdavid@example.net Mon Nov 02 07:44:55 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 28918 invoked from network); 2 Nov 2009 07:44:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 07:44:55 -0000 Received: (qmail 75448 invoked by uid 500); 2 Nov 2009 07:44:51 -0000 Delivered-To: carterdavid@example.net Received: (qmail 75416 invoked by uid 500); 2 Nov 2009 07:44:51 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 75407 invoked by uid 99); 2 Nov 2009 07:44:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 07:44:51 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO correo15.acens.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 07:44:41 +0000 Received: (qmail 24002 invoked from network); 2 Nov 2009 07:44:20 -0000 Received: from unknown (HELO [83.161.120.155]) ([83.161.120.155]) (envelope-sender <carterdavid@example.net>) by correo15.acens.net (qmail-ldap-1.03) with SMTP for <carterdavid@example.net>; 2 Nov 2009 07:44:20 -0000 Date: Mon, 2 Nov 2009 08:44:18 +0100 (CET) From: =?ISO-8859-15?Q?I=F1igo_Medina_Garc=EDa?= <carterdavid@example.net> X-X-Sender: spiff@krusty To: carterdavid@example.net In-Reply-To: <carterdavid@example.net> Message-ID: <alpine.DEB.2.00.0911020840310.12576@krusty> References: <carterdavid@example.net> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Apache on F11. ANY APPROACH ?excluding images pdfs etc from Https ( ssl ) routing > I would like to JUST limit https usage to the login window html and ALL other images pdf's not secured html > ( one that do not need password ) should use HTTP NOT HTTPS > What I cannot really find ( and Apache modules make a graduate course , as I am realizing with all the > futile digging in ) is HOW do I tell apache that if you find an image file ( .jpeg or .pdf ) if it comes to > https convert all that into http .Has that something to do with rewrite or redirect modules . Yep. At least that is the way I do it, using rewrite. Once you start Apache as a secure server all the content is served through secure layer. With rewrite sentences you can override that. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net " from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net From carterdavid@example.net Mon Nov 02 08:50:55 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 44693 invoked from network); 2 Nov 2009 08:50:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 08:50:55 -0000 Received: (qmail 24978 invoked by uid 500); 2 Nov 2009 08:50:52 -0000 Delivered-To: carterdavid@example.net Received: (qmail 24926 invoked by uid 500); 2 Nov 2009 08:50:52 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 24917 invoked by uid 99); 2 Nov 2009 08:50:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 08:50:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO web51711.mail.re2.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 02 Nov 2009 08:50:42 +0000 Received: (qmail 84254 invoked by uid 60001); 2 Nov 2009 08:50:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1257151820; bh=V3a4keF/9JTHImStzrttY6TkrJsAUa//dltOLpqkqbM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=vxFdpB4EYr9dQmPBmCNKu/hRGOSKfdSh8uPa0UDVuIdagJCYVL+P5pkbNvXxbos3lcw9hdQjDJ0EEWMgllvvnRba/d6LMyIN8yISLSViK9lNWK2j3oS5mCnfmMsyrZ0NUspt8LqpUgSPk16mAXx5Ok8pH8D2OTgJI1XfsXwQJvA= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=TPsHJCj7jW/b7/OsyN13TivpX2jCP8q2adT8W9OVGf9gv8ztbT7HMhd+uLi9myQQGwhCaVi9ybSVXn8kORCUsCjVAgtzb0RsM8qZkvwCPZnm7GRkmOXlrbIcteHtd1f70nn60yOsOzZLRKBjCdktLQxWUZaYyBSHamMsVQtSDNk=; Message-ID: <carterdavid@example.net> X-YMail-OSG: P1hDpEkVM1l4XHOUFdH19bEfFuzOEPJCMXn98kxxgA_nKGTttfuGUkl.Jd9CSlP0ydHAP26fugXI_eU4AA7pYpLpH.WO7qfqLKuB8j2cxdaIP6pD75s7NJIfSzTmvHwh9t7nYAB2iKHUiQDPchxf5.dunKzbCzoxCF8TwygEE9f2UoOuqKIpj1yMHN.CDMFGfnrrlOvfPdgAXfT9hv9kOqKRU6SdJoHuQSLW_UHR5L6vVqWjlI4QbijYq5NXvqWLTAfOEU64z1fd2ei_L.foyrzvfTvlOlq1RatiIMERjWWeFsD3I1eNQJX8K5ZB2CZ1kzHHPwHzOnm7iMm3F29U4DFPZGLGkAK.kPWdCvzeUWjjjat4Mtj42yk1B0ujPViMw1K6tRnuhxbdVXTE7qFUgVGzy.df2txcqQa07BB1G9GGvv.6MnkdJ9otaC3HT0Pcv3gj_UUGRRXE1H792BZckV7aQuCJSNLJfHw95o9b75k2aHpuHfXJfjded.qOe8lPNIWg4g-- Received: from [83.161.120.155] by web51711.mail.re2.yahoo.com via HTTP; Mon, 02 Nov 2009 00:50:20 PST X-Mailer: YahooMailClassic/7.0.14 YahooMailWebService/0.7.361.4 Date: Mon, 2 Nov 2009 00:50:20 -0800 (PST) From: Andrei Iarus <carterdavid@example.net> To: carterdavid@example.net In-Reply-To: <carterdavid@example.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-484256174-1257151820=:76716" X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] mod_rewrite and setenv --0-484256174-1257151820=:76716 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I am sorry, I looked only at "Using Environment Variables", "URL Rewriting"= , as I needed to read it (use it), and not to set it :) So a suggestion wou= ld be to move the info to that paragraph (eventually=A0to put link to "Some= Caveats" ?) =A0 ANYWAY, I would expect this info also in the mod_rewrite, RewriteCond's doc= umentation page. Thanks a lot. Have a nice day! --- On Sun, 11/1/09, Andr=E9 Warnier <carterdavid@example.net> wrote: From: Andr=E9 Warnier <carterdavid@example.net> Subject: Re: [users@httpd] mod_rewrite and setenv To: carterdavid@example.net Date: Sunday, November 1, 2009, 10:36 PM Andrei Iarus wrote: > Thanks very much for the fast responses. Can this info be added in the mo= d_rewrite documentation, as this is very important for future questions? >=A0=20 It's already there, see : http://httpd.apache.org/docs/2.2/env.html Some Caveats > OR: can the order of processing be changed? >=20 Are you kidding ? --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net =A0 "=A0=A0=A0from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net =0A=0A=0A --0-484256174-1257151820=:76716 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" ><tr><td valign=3D"= top" style=3D"font: inherit;"><DIV>I am sorry, I looked only at "Using Envi= ronment Variables", "URL Rewriting", as I needed to read it (use it), and n= ot to set it :) So a suggestion would be to move the info to that paragraph= (eventually&nbsp;to put link to "<A id=3Dcaveats name=3Dcaveats>Some Cavea= ts</A>" ?)</DIV> <DIV>&nbsp;</DIV> <DIV>ANYWAY, I would expect this info also in the mod_rewrite, RewriteCond'= s documentation page.<BR></DIV> <DIV>Thanks a lot.</DIV> <DIV>Have a nice day!</DIV> <DIV><BR>--- On <B>Sun, 11/1/09, Andr=E9 Warnier <I>&lt;carterdavid@example.net&gt;</= I></B> wrote:<BR></DIV> <BLOCKQUOTE style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(= 16,16,255) 2px solid"><BR>From: Andr=E9 Warnier &lt;carterdavid@example.net&gt;<BR>Su= bject: Re: [users@httpd] mod_rewrite and setenv<BR>To: carterdavid@example.net= rg<BR>Date: Sunday, November 1, 2009, 10:36 PM<BR><BR> <DIV class=3DplainMail>Andrei Iarus wrote:<BR>&gt; Thanks very much for the= fast responses. Can this info be added in the mod_rewrite documentation, a= s this is very important for future questions?<BR>&gt;&nbsp; <BR>It's alrea= dy there, see :<BR><A href=3D"http://httpd.apache.org/docs/2.2/env.html" ta= rget=3D_blank>http://httpd.apache.org/docs/2.2/env.html</A><BR>Some Caveats= <BR><BR>&gt; OR: can the order of processing be changed?<BR>&gt; <BR>Are yo= u kidding ?<BR><BR>--------------------------------------------------------= -------------<BR>The official User-To-User support forum of the Apache HTTP= Server Project.<BR>See &lt;URL:<A href=3D"http://httpd.apache.org/userslis= t.html" target=3D_blank>http://httpd.apache.org/userslist.html</A>&gt; for = more info.<BR>To unsubscribe, e-mail: <A href=3D"http://us.mc517.mail.yahoo= .carterdavid@example.net" ymailto=3D"mailto:= carterdavid@example.net">carterdavid@example.net</A><= BR>&nbsp; "&nbsp;&nbsp;&nbsp;from the digest: <A href=3D"http://us.mc517.mail.yahoo.= carterdavid@example.net" ymailto=3D"m= ailto:carterdavid@example.net">users-digest-unsubscribe@h= ttpd.apache.org</A><BR>For additional commands, e-mail: <A href=3D"http://u= carterdavid@example.net" ymailto= =3D"mailto:carterdavid@example.net">carterdavid@example.net</A><BR>= <BR></DIV></BLOCKQUOTE></td></tr></table><br>=0A=0A --0-484256174-1257151820=:76716-- From carterdavid@example.net Mon Nov 02 08:58:03 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 45853 invoked from network); 2 Nov 2009 08:58:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 08:58:03 -0000 Received: (qmail 37205 invoked by uid 500); 2 Nov 2009 08:58:00 -0000 Delivered-To: carterdavid@example.net Received: (qmail 37160 invoked by uid 500); 2 Nov 2009 08:58:00 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 37151 invoked by uid 99); 2 Nov 2009 08:58:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 08:58:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of carterdavid@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO tor.combios.es) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 08:57:49 +0000 Received: from localhost (localhost [83.161.120.155]) by tor.combios.es (Postfix) with ESMTP id 551BB2260A5 for <carterdavid@example.net>; Mon, 2 Nov 2009 09:57:28 +0100 (CET) Received: from tor.combios.es ([83.161.120.155]) by localhost (tor.combios.es [83.161.120.155]) (amavisd-new, port 10024) with ESMTP id X6b+FFMIEWg6 for <carterdavid@example.net>; Mon, 2 Nov 2009 09:57:28 +0100 (CET) Received: from [83.161.120.155] (p549EB010.dip0.t-ipconnect.de [83.161.120.155]) by tor.combios.es (Postfix) with ESMTPA id CA5FD226099 for <carterdavid@example.net>; Mon, 2 Nov 2009 09:57:27 +0100 (CET) Message-ID: <carterdavid@example.net> Date: Mon, 02 Nov 2009 09:57:13 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= <carterdavid@example.net> Reply-To: carterdavid@example.net User-Agent: Thunderbird 83.161.120.155 (Windows/20090812) MIME-Version: 1.0 To: carterdavid@example.net References: <carterdavid@example.net> In-Reply-To: <carterdavid@example.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Apache on F11. ANY APPROACH ?excluding images pdfs etc from Https ( ssl ) routing carterdavid@example.net wrote: > Hi Folks > > - I am a squat on advanced Apache work. I would get a basic SSL > functionality to work. > > So https://foobar.com works fine and gets me all the login windows I > designed. however currently all the images and other extensions like .pdf > are also using the https routing. > some image referred on that https link > e.g. https://foobar.com/loginhere.jpeg c > can be displayed using https but not http > I would like to JUST limit https usage to the login window html and ALL > other images pdf's not secured html ( one that do not need password ) should > use HTTP NOT HTTPS > What I cannot really find ( and Apache modules make a graduate course , as I > am realizing with all the futile digging in ) is HOW do I tell apache that > if you find an image file ( .jpeg or .pdf ) if it comes to https convert all > that into http .Has that something to do with rewrite or redirect modules . > I think there is something basic which you should understand first : Apache does not "decide" to send this or that via HTTPS. Apache responds to a request from the browser. If the browser requests an object with a https://.. URL, then Apache will respond that way. If the browser requests an object using a http://... URL, then Apache will respond that way. In other words, you have to make sure, in the pages *you* send back to the browser, that the links, from the browser point of view, evaluate to "http://.." and not "https://..". Let me give you a simplified example. 1) The browser initially requests a page from the server, using (e.g.) a URL like https://server.mycompany.com/login-page.html That means that this browser is a) setting up a https connection to "server.mycompany.com" b) on that connection, sending a request for host "server.mycompany.com" and page "/login-page.html" 2) the server sends back the page, on the same https connection. (Note that the connection is the one initiated by the browser. The server never initiates a connection to the browser. It just responds on the same connection which the browser has set up). 3) in that page, are links like : <img src="/images/myimage.gif"> 4) the browser is going to "evaluate" these URLs, make them into "full" URLs, and then send new requests for those objects to the server. In this case, the browser see that the URL is missing a protocol and a servername, so it will add them first. What will it add ? It will take the protocol and the servername from which this page (login-page) has "arrived". In other words, *the browser* here will take the URL "/images/myimage.gif", and add the protocol and the server, to give "https://server.mycompany.com/images/myimage.gif", and then *the browser* will requests this URL from the server. 5) the server gets this request and answers appropriately. If, instead, the links to the images, in the page login-page.html, had been like <img src="http://myserver.company.com/images/myimage.gif"> then the browser would request this image on a non-https channel, and the server would respond on that non-https channel. In other words, what happens is basically your problem, not Apache's. The above is the simple way. There are other, less efficient ways. You can arrange, at the server level, that when it receives a request for "https://server.company.com/images/something", it would *send a REDIRECT response* to the browser, telling the browser essentially : hey, that's the wrong address for that thing, please use this one instead. That is called a 301 response, and you can do that with mod_rewrite. The browser, when it receives this message, will then automatically initiate a *new connection* with the server, and re-request the same object using the URL which the 301 Apache response contained. But consider that it is always less efficient than sending the correct link in the page in the first place, because you need a first request to the server, a server response, then a new request from the browser to the server before you get your image. What Apache cannot do, at level (5) above, in the middle of the conversation, is decide to change the protocol of the connection from HTTPS to HTTP. That would break the existing connection. And how would the browser know that it suddenly is going to receive a response on a new connection, set up by the server ? That is not how HTTP works. And that is also why you do not find anything that replies to your question in the Apache documentation or code : because, from a HTTP protocol point of view, it does not make any sense, so it's just not there. Yes ? --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: carterdavid@example.net " from the digest: carterdavid@example.net For additional commands, e-mail: carterdavid@example.net From carterdavid@example.net Mon Nov 02 09:02:22 2009 Return-Path: <carterdavid@example.net> Delivered-To: carterdavid@example.net Received: (qmail 47323 invoked from network); 2 Nov 2009 09:02:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 09:02:22 -0000 Received: (qmail 42595 invoked by uid 500); 2 Nov 2009 09:02:19 -0000 Delivered-To: carterdavid@example.net Received: (qmail 42541 invoked by uid 500); 2 Nov 2009 09:02:18 -0000 Mailing-List: contact carterdavid@example.net; run by ezmlm Precedence: bulk Reply-To: carterdavid@example.net list-help: <mailto:carterdavid@example.net> list-unsubscribe: <mailto:carterdavid@example.net> List-Post: <mailto:carterdavid@example.net> List-Id: <users.httpd.apache.org> Delivered-To: mailing list carterdavid@example.net Received: (qmail 42532 invoked by uid 99); 2 Nov 2009 09:02:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 09:02:18 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carterdavid@example.net designates
{'source': 'Apache Software Foundation Public Mail Archives'}