Re: [users@httpd] Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?

2017-03-02 Thread Eric Covener
On Thu, Mar 2, 2017 at 8:02 AM, Binyamin <7rai...@inbox.lv> wrote:
> If so then it is Apache bug. Any open issue for it?

I don't agree, the highly unusual configuration just doesn't do what
you'd like it to do.  See my earlier response.
-- 
Eric Covener
cove...@gmail.com

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?

2017-03-02 Thread Binyamin
בע"ה


If so then it is Apache bug. Any open issue for it?


Binyamin


On Thu, Mar 2, 2017 at 2:38 PM, Yehuda Katz  wrote:

> The order modules are loaded in the config file does not change the order
> they execute. That is set in the code.
>
> - Y
>
> Sent from a device with a very small keyboard and hyperactive autocorrect.
>
> On Mar 2, 2017 6:03 AM, <7rai...@inbox.lv> wrote:
>
>> Eric, it is not the case. Here is the order of my loaded modules and the
>> issue still happens (is relevant also for latest Apache version):
>> ...
>> LoadModule expires_module modules/mod_expires.so
>> LoadModule headers_module modules/mod_headers.so
>> ...
>>
>>
>> Binyamin
>>
>> - Reply to message -
>> *Subject:* Re: [users@httpd] Why ExpiresByType is ignored when has
>> SetHandler application/x-httpd-php ?
>> *Date:* trešdiena, 2016. gada 28. decembris 13:20:25
>> *From:* Eric Covener  
>> *To:*  
>>
>> On Tue, Dec 27, 2016 at 10:29 PM, Yehuda Katz  wrote:
>> > Why ExpiresByType is ignored when has SetHandler
>> application/x-httpd-php ?
>> >
>> > /sitemap.xml Response Headers shows 1 day expiration while expected to
>> be 1
>> > year (1 month)
>> >
>> > Content-Type: application/xml; charset=utf-8
>> > Date: Tue, 27 Dec 2016 19:59:00 GMT
>> > Expires: Wed, 28 Dec 2016 19:59:00 GMT
>> >
>> > seems SetHandler forces it to apply text/html expiration and doesn't
>> allow
>> > to rewrite it
>> >
>> > ExpiresActive On
>> > ExpiresDefault "access plus 1 month"
>> > ExpiresByType text/html "access plus 1 day"
>> > ExpiresByType application/xml "access plus 1 week"
>> >
>> > 
>> > SetHandler application/x-httpd-php
>> > Header set Content-Type "application/xml"
>> > ExpiresDefault "access plus 1 year"
>> > 
>>
>> It's likely just an ordering problem. mod_expires runs before
>> mod_headers and you can't really change it any meaningful way in this
>> case (you can ask mod_headers to run much earlier, but then your
>> scripts output will overwrite it anyway)
>>
>> Presumably your script issues Content-Type: text/html which is bogus
>> and what's seen when mod_expires runs. A short while later,
>> mod_headers changes the content-type.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
>>
>> - To
>> unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional
>> commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?

2017-03-02 Thread Yehuda Katz
The order modules are loaded in the config file does not change the order
they execute. That is set in the code.

- Y

Sent from a device with a very small keyboard and hyperactive autocorrect.

On Mar 2, 2017 6:03 AM, <7rai...@inbox.lv> wrote:

> Eric, it is not the case. Here is the order of my loaded modules and the
> issue still happens (is relevant also for latest Apache version):
> ...
> LoadModule expires_module modules/mod_expires.so
> LoadModule headers_module modules/mod_headers.so
> ...
>
>
> Binyamin
>
> - Reply to message -
> *Subject:* Re: [users@httpd] Why ExpiresByType is ignored when has
> SetHandler application/x-httpd-php ?
> *Date:* trešdiena, 2016. gada 28. decembris 13:20:25
> *From:* Eric Covener  
> *To:*  
>
> On Tue, Dec 27, 2016 at 10:29 PM, Yehuda Katz  wrote:
> > Why ExpiresByType is ignored when has SetHandler application/x-httpd-php
> ?
> >
> > /sitemap.xml Response Headers shows 1 day expiration while expected to
> be 1
> > year (1 month)
> >
> > Content-Type: application/xml; charset=utf-8
> > Date: Tue, 27 Dec 2016 19:59:00 GMT
> > Expires: Wed, 28 Dec 2016 19:59:00 GMT
> >
> > seems SetHandler forces it to apply text/html expiration and doesn't
> allow
> > to rewrite it
> >
> > ExpiresActive On
> > ExpiresDefault "access plus 1 month"
> > ExpiresByType text/html "access plus 1 day"
> > ExpiresByType application/xml "access plus 1 week"
> >
> > 
> > SetHandler application/x-httpd-php
> > Header set Content-Type "application/xml"
> > ExpiresDefault "access plus 1 year"
> > 
>
> It's likely just an ordering problem. mod_expires runs before
> mod_headers and you can't really change it any meaningful way in this
> case (you can ask mod_headers to run much earlier, but then your
> scripts output will overwrite it anyway)
>
> Presumably your script issues Content-Type: text/html which is bogus
> and what's seen when mod_expires runs. A short while later,
> mod_headers changes the content-type.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>
>
> - To
> unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional
> commands, e-mail: users-h...@httpd.apache.org


Re: [users@httpd] Apache Crashing Everyday

2017-03-02 Thread Jim Jagielski
Depending on your version of Tomcat it might be better to move to
using mod_proxy_ajp or even switching to Tomcat's http listener and
talking HTTP.

> On Mar 2, 2017, at 1:55 AM, Jayaram Ponnusamy  
> wrote:
> 
> Hi Jim & Jason,
> 
> Yes We are planning to upgrade to httpd 2.4.25 (Stable Version). So, in the 
> 2.4.25 also we should use mod_jk to connect with Tomcat or anyother better 
> options are there?
> Tomcat instances are running on different machines.
> And mod_php is not configured.
> Thanks 
> 
> 
> On Wed, Mar 1, 2017 at 9:19 PM, Jason Brooks  wrote:
> Hello,
> 
> You will also need to turn off mod_php if it’s loaded.
> 
> —jason
> 
> Jason Brooks  Systems Administrator
> eROI  Performance is Art.
>  
> m:505 nw couch #300   w:  eroi.com
> t:503.290.3105f:  503.228.4249
> 
> 
> fb:   fb.com/eROI
> 
> 
> 
> 
> 
> 
> 
> 
>> On Mar 1, 2017, at 8:35 AM, Jim Jagielski  wrote:
>> 
>> If you can, I would upgrade to httpd 2.4.x... If you must
>> stay w/ 2.2.x, then Worker might be more reliable for you
>> than Event.
>> 
>>> On Mar 1, 2017, at 9:56 AM, Jayaram Ponnusamy  
>>> wrote:
>>> 
>>> Thanks Jim for the suggestion.
>>> I will update
>>> Timeout 5
>>> KeepAliveTimeout 2
>>> 
>>> We are using Apache 2.2.23
>>> We will try to install Event MPM and will check.
>>> Thanks
>>> Jay
>>> 
>>> 
>>> 
>>> On Mar 1, 2017 5:05 PM, "Jim Jagielski"  wrote:
>>> You should not be using prefork unless you really, really need to.
>>> 
>>> Assuming you are running 2.4.x, I would strongly suggest running
>>> the Event MPM.
>>> 
>>> Your Timeout and KeepAliveTimeout values are also way too big;
>>> I'd recommend 5 and 2, respectively.
>>> 
 On Mar 1, 2017, at 4:19 AM, Jayaram Ponnusamy 
  wrote:
 
 Dear All,
 
 We are using 2 Apache & 2 Tomcat with LoadBalance. Everyday the site is 
 goes down and restarting Apache & Tomcat only help to bring the site back.
 
 I could see below errors on WebServer's Error Log, when the "total 
 children" count increased more than 200 then Apache is not responding. I 
 have included my prefork configuration below. Kindly please help to 
 resolve this issue.
 
 [Wed Mar 01 11:46:39 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 8 children, there 
 are 1 idle, and 464 total children
 [Wed Mar 01 11:47:25 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 8 children, there 
 are 0 idle, and 507 total children
 [Wed Mar 01 11:47:34 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 8 children, there 
 are 0 idle, and 522 total children
 [Wed Mar 01 11:47:35 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 16 children, 
 there are 3 idle, and 530 total children
 [Wed Mar 01 11:48:22 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 8 children, there 
 are 0 idle, and 578 total children
 [Wed Mar 01 11:48:23 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 16 children, 
 there are 0 idle, and 586 total children
 [Wed Mar 01 11:48:24 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 602 total children
 [Wed Mar 01 11:48:25 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 634 total children
 [Wed Mar 01 11:48:26 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 666 total children
 [Wed Mar 01 11:48:27 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 698 total children
 [Wed Mar 01 11:48:28 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 730 total children
 [Wed Mar 01 11:48:29 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 762 total children
 [Wed Mar 01 11:48:30 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 794 total children
 [Wed Mar 01 11:48:31 2017] [info] server seems busy, (you may need to 
 increase StartServers, or Min/MaxSpareServers), spawning 32 children, 
 there are 0 idle, and 826 total children
 [Wed Mar 01 11:48:32 2017] [info] 

Re: [users@httpd] Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?

2017-03-02 Thread 7raivis
Eric, it is not the case. Here is the order of my loaded modules and the issue still happens (is relevant also for latest Apache version):
...
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
...


 



Binyamin
 
- Reply to message -
Subject: Re: [users@httpd] Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?
Date: trešdiena, 2016. gada 28. decembris 13:20:25
From: Eric Covener 
To: 

On Tue, Dec 27, 2016 at 10:29 PM, Yehuda Katz  wrote:
> Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?
>
> /sitemap.xml Response Headers shows 1 day expiration while expected to be 1
> year (1 month)
>
> Content-Type: application/xml; charset=utf-8
> Date: Tue, 27 Dec 2016 19:59:00 GMT
> Expires: Wed, 28 Dec 2016 19:59:00 GMT
>
> seems SetHandler forces it to apply text/html expiration and doesn't allow
> to rewrite it
>
> ExpiresActive On
> ExpiresDefault "access plus 1 month"
> ExpiresByType text/html "access plus 1 day"
> ExpiresByType application/xml "access plus 1 week"
>
> 
> SetHandler application/x-httpd-php
> Header set Content-Type "application/xml"
> ExpiresDefault "access plus 1 year"
> 

It's likely just an ordering problem. mod_expires runs before
mod_headers and you can't really change it any meaningful way in this
case (you can ask mod_headers to run much earlier, but then your
scripts output will overwrite it anyway)

Presumably your script issues Content-Type: text/html which is bogus
and what's seen when mod_expires runs. A short while later,
mod_headers changes the content-type.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org
 

 



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] mod_lua and subprocess_env

2017-03-02 Thread Andrei Ivanov
On Tue, Feb 28, 2017 at 12:09 PM, Andrei Ivanov 
wrote:

> On Mon, Feb 27, 2017 at 11:58 AM, Andrei Ivanov 
> wrote:
>
>> On Fri, Feb 24, 2017 at 10:58 PM, Andrei Ivanov 
>> wrote:
>>
>>> On Feb 24, 2017 22:54, "Yann Ylavic"  wrote:
>>>
>>> On Fri, Feb 24, 2017 at 6:50 PM, Andrei Ivanov 
>>> wrote:
>>> >
>>> > I've managed to apply your patch and rebuild Apache and now I have:
>>> > Header set Client-IP "expr=%{REMOTE_ADDR}"
>>> > Header set Client-SAN "expr=%{PeerExtList:2.5.29.17}"
>>> > Header set Client-DN "expr=%{SSL_CLIENT_S_DN}"
>>>
>>> Could you please add:
>>>   Header set Expr "'IP Address:'.%{REMOTE_ADDR} -in
>>> PeerExtList('2.5.29.17')"
>>> ?
>>>
>>> If it outputed "Expr: IP Addressfalse" that'd be issue with operators'
>>> precedence.
>>> I'll try on my side, but you may beat me to it since you have the
>>> environment...
>>>
>>>
>>> Ugh, it's my work environment, I'll be able to access it only on Monday.
>>>
>>>
>> Tried now, I've adapted your suggestion a bit as it doesn't seem correct:
>>
>> Header set Expr "expr='IP Address:'.%{REMOTE_ADDR} -in
>> %{PeerExtList:2.5.29.17}"
>>
>> This results in:
>> Expr: 'IP Address:'.159.107.78.127 -in email:,
>> email:, IP Address:127.0.0.1, IP Address:0:0:0:0:0:0:0:1, IP
>> Address:159.107.78.127, IP Address:FE80:0:0:0:6D03:4CE1:C15F:5A44
>>
>> As far as I understand, it doesn't perform the concatenation properly.
>> I've tried
>> Header set Expr "expr='%{IP Address:'.%{REMOTE_ADDR}} -in
>> %{PeerExtList:2.5.29.17}"
>>
>> But I get a parse error at startup:
>> Can't parse value expression : syntax error, unexpected T_ERROR,
>> expecting T_VAR_END or ':': Invalid character in variable name ' '
>>
>> But I think mod_headers has some different way of interpreting
>> expressions, because this doesn't work:
>>
>> Header set matched false
>> 
>> Header set matched true
>> 
>>
>> Cannot parse condition clause: syntax error, unexpected T_VAR_BEGIN,
>> expecting T_ID or '{
>>
>
> Yann? Any clues? :-)
>

Ping 😐


[users@httpd] Apache configuration - DirectoryMatch directive: Error in regex evaluation

2017-03-02 Thread MARTIN, FANNY
Dear all,

I am using Apache/2.4.10 (Debian). Following the Apache documentation, I am 
trying to configure my server using DirectoryMatch. I get the expected behavior 
concerning the directories I want to handle (only user whose name is the same 
as the directory name can access to the directory). However I cannot access to 
the parent directory ("/var/www/html/webdav/directories/” in the example below) 
getting an “401 Unauthorized”. Changing the dynamic ldap user  
“%{env:MATCH_DIRECTORYNAME}” by a specific user allows me to access to 
"/var/www/html/webdav/directories/”. It seems to me that 
"/var/www/html/webdav/directories/” matches the regex I defined which should 
not be the case ! I have added “[a-z]” to be sure not to match the regex but it 
does not solve my problem.

Please find below my configuration:

[a-z][^/]+)">
Dav On
AuthName "Authentication required"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPURL 


  Require ldap-user %{env:MATCH_DIRECTORYNAME}

  

Any hints welcome,
Thanks in advance,
Fanny

Ce message et toutes les pièces jointes (ci-après le "message") sont établis à 
l’intention exclusive des destinataires désignés. Il contient des informations 
confidentielles et pouvant être protégé par le secret professionnel. Si vous 
recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et 
de détruire le message. Toute utilisation de ce message non conforme à sa 
destination, toute diffusion ou toute publication, totale ou partielle, est 
interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant 
pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) 
décline(nt) toute responsabilité au titre de son contenu. Bien que ce message 
ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne 
peut garantir l’absence totale de logiciels malveillants dans son contenu et ne 
pourrait être tenu pour responsable des dommages engendrés par la transmission 
de l’un d’eux.

This message and any attachments (the "message") are intended solely for the 
addressee(s). It contains confidential information, that may be privileged. If 
you receive this message in error, please notify the sender immediately and 
delete the message. Any use of the message in violation of its purpose, any 
dissemination or disclosure, either wholly or partially is strictly prohibited, 
unless it has been explicitly authorized by the sender. As its integrity cannot 
be secured on the internet, Atos and its subsidiaries decline any liability for 
the content of this message. Although the sender endeavors to maintain a 
computer virus-free network, the sender does not warrant that this transmission 
is virus-free and will not be liable for any damages resulting from any virus 
transmitted.