Re: [users@httpd] Piping logs to a java process : creates multiple processes

2017-03-10 Thread Milind Vaidya
I am revisiting this. As per the change suggested I modified the program so
that it returns EOF and it was working fine. Until one day, the program
which is supposed to get restarted by apache every hour (that's when log
file rotates), stopped getting restarted. It is not stuck. It is still
processing the things. But it is just that it has been running for many
days with same pid. I wonder if that will cause some problem. I am actually
storing all the events read by this program somewhere else. Then I need to
compare these with the logrotate which is hourly rotating the error_log
file. Here I find few events missing.

Any pointers for debugging this ?


On Mon, Jan 23, 2017 at 4:41 PM, Eric Covener  wrote:

> On Mon, Jan 23, 2017 at 7:36 PM, Milind Vaidya  wrote:
> > When httpd is started it spawns 2 processes and adds one every one hour,
> > keeping all alive
>
>
> Your java program needs to exit when stdin returns EOF.
>
> --
> 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] URG:DocumentRoot relate query on WIndows

2017-03-10 Thread William A Rowe Jr
What you are seeing is correct behavior, DocumentRoot is an absolute
path, whether you have specified this or not. If httpd sees an incomplete
path, it is going to work out an absolute path from the ServerRoot If it
appends the default and cannot establish a full path, you will receive
the indicated error.

It seems your ServerRoot/config is equally problematic, if httpd.conf
exists in the root of a system volume. There should be nothing that
is significant about the volume C:, but there may be something very
significant about the permissions of that volume, etc.

On Fri, Mar 10, 2017 at 7:25 AM, Ishan Thakur
 wrote:
> Hi All,
>
> We are using http-2.2.31 for our application on Windows.
> We are running our application as Local Service on Windows.
> The problem description is as follows:
> “We are setting the documentRoot as “web”(no complete absolute path). This
> works fine for all the paths.
> The paths can be direct drive(D:\). But it fails only for C drive(C:\). The
> same works fine for all other paths(D:\, C:\Program Files…etc)
>
> For C drive, we are getting following error:
>
> Syntax error on line 129 of C:/httpd.conf:
> DocumentRoot must be a directory
> “
> Is there any restriction for C drive on Windows for Apache httpd-2.2.31?
>
> Regards,
> Ishan

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



[users@httpd] nonconsistent proxy 503 or 502 errors with apache 2.4

2017-03-10 Thread David Mehler
Hello,

I'm running a FreeBSD 10.3 server which has an Apache 2.4.25 system
running on it. It's reverse proxying to two web servers example.com
and example2.com hosted in two separate FreeBSD jails.

I'm getting nonconsistent 502 and 503 errors when atempting to access
the systems from the outside.

For example one time I hit example.com and it works. I then go to
example2.com and get either a 502 or 503 message. I try from another
browser this time going to example2.com and it works, but then going
to example.com gives me those same 502 or 503 error messages. This
seems to be the clearest I can explain the issue.

I've included the relevant portions of the host's apache
configuration. If you need more or if anyone can see an issue please
let me know.

Thanks.
Dave.

host httpd.conf:
LoadModule proxy_module libexec/apache24/mod_proxy.so
LoadModule proxy_http_module libexec/apache24/mod_proxy_http.so

host proxy.conf:

 ServerName webmail2.example.com
 ServerAdmin webmas...@example.com
 ProxyRequests off
 ProxyPreserveHost on
 ProxyPass / http://10.0.0.15/
 ProxyPassReverse / http://10.0.0.15/
 
  Require all granted
 
 ErrorLog /var/log/proxy/webmail2.example.com.log
 CustomLog /var/log/proxy/webmail2.example.com.custom combined



 ServerName test.example2.com
 ServerAdmin webmas...@example2.com
 ProxyRequests off
 ProxyPreserveHost on
 ProxyPass / http://10.0.0.17/
 ProxyPassReverse / http://10.0.0.17/
 
  Require all granted
 
 ErrorLog /var/log/proxy/test.example.com2.log
 CustomLog /var/log/proxy/test.example2.com.custom combined


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



Re: [users@httpd] ProxyPass ! directive

2017-03-10 Thread Matthew Broadhead

i moved the LogLevel directive to httpd.conf and now i get this
[Fri Mar 10 16:41:21.491354 2017] [proxy:debug] [pid 18744] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18744 for (*)
[Fri Mar 10 16:41:21.496525 2017] [proxy:debug] [pid 18745] 
proxy_util.c(1885): AH00927: initializing worker proxy:reverse local
[Fri Mar 10 16:41:21.496580 2017] [proxy:debug] [pid 18745] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18745 for (*)
[Fri Mar 10 16:41:21.497679 2017] [proxy:debug] [pid 18746] 
proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared
[Fri Mar 10 16:41:21.497709 2017] [proxy:debug] [pid 18746] 
proxy_util.c(1885): AH00927: initializing worker proxy:reverse local
[Fri Mar 10 16:41:21.497735 2017] [proxy:debug] [pid 18746] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18746 for (*)
[Fri Mar 10 16:41:21.498734 2017] [proxy:debug] [pid 18747] 
proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared
[Fri Mar 10 16:41:21.503525 2017] [proxy:debug] [pid 18747] 
proxy_util.c(1885): AH00927: initializing worker proxy:reverse local
[Fri Mar 10 16:41:21.503572 2017] [proxy:debug] [pid 18747] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18747 for (*)
[Fri Mar 10 16:41:21.504645 2017] [proxy:debug] [pid 18748] 
proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared
[Fri Mar 10 16:41:21.504673 2017] [proxy:debug] [pid 18748] 
proxy_util.c(1885): AH00927: initializing worker proxy:reverse local
[Fri Mar 10 16:41:21.504698 2017] [proxy:debug] [pid 18748] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18748 for (*)
[Fri Mar 10 16:41:21.508263 2017] [proxy:debug] [pid 18749] 
proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared
[Fri Mar 10 16:41:21.508293 2017] [proxy:debug] [pid 18749] 
proxy_util.c(1885): AH00927: initializing worker proxy:reverse local
[Fri Mar 10 16:41:21.508321 2017] [proxy:debug] [pid 18749] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18749 for (*)
[Fri Mar 10 16:41:21.510407 2017] [proxy:debug] [pid 18750] 
proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared
[Fri Mar 10 16:41:21.510425 2017] [proxy:debug] [pid 18750] 
proxy_util.c(1885): AH00927: initializing worker proxy:reverse local
[Fri Mar 10 16:41:21.510444 2017] [proxy:debug] [pid 18750] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18750 for (*)
[Fri Mar 10 16:41:21.511463 2017] [proxy:debug] [pid 18751] 
proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared
[Fri Mar 10 16:41:21.511479 2017] [proxy:debug] [pid 18751] 
proxy_util.c(1885): AH00927: initializing worker proxy:reverse local
[Fri Mar 10 16:41:21.511496 2017] [proxy:debug] [pid 18751] 
proxy_util.c(1936): AH00931: initialized single connection worker in 
child 18751 for (*)

but it doesn't seem to show anything

On 10/03/2017 17:37, Matthew Broadhead wrote:

i also added this in the virtual host
LogLevel info proxy:debug
but it makes no difference to the output in error_log

On 10/03/2017 16:48, Eric Covener wrote:

On Fri, Mar 10, 2017 at 10:43 AM, Matthew Broadhead
 wrote:

yes it is definitely because of that line.  i also just tried

ProxyPass ajp://www.nbmlaw.co.uk:8010/


ProxyPass !

and that has exactly the same effect


That syntax is known to not work. Once you proxy within 

Re: [users@httpd] ProxyPass ! directive

2017-03-10 Thread Matthew Broadhead

i also added this in the virtual host
LogLevel info proxy:debug
but it makes no difference to the output in error_log

On 10/03/2017 16:48, Eric Covener wrote:

On Fri, Mar 10, 2017 at 10:43 AM, Matthew Broadhead
 wrote:

yes it is definitely because of that line.  i also just tried

ProxyPass ajp://www.nbmlaw.co.uk:8010/


ProxyPass !

and that has exactly the same effect


That syntax is known to not work. Once you proxy within 

Re: [users@httpd] URG:DocumentRoot relate query on WIndows

2017-03-10 Thread Yehuda Katz
You can set the DocumentRoot to "C:/" (note the forward slash instead of
the backslash).
You can technically set it to just "/" also if you want the drive where
HTTPD is located.

When running HTTPD on Windows, it is good practice to use forward slashes
even though backslashes work in some places.
This is supposed to be inserted as a comment in the Windows httpd.conf (by
httpd/branches/2.4.x/build/installwinconf.awk):


> # NOTE: Where filenames are specified, you must use forward slashes
> # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
> # If a drive letter is omitted, the drive on which httpd.exe is located
> # will be used by default.  It is recommended that you always supply
> # an explicit drive letter in absolute paths to avoid confusion.


- Y

On Fri, Mar 10, 2017 at 8:37 AM, Eric Covener  wrote:

> On Fri, Mar 10, 2017 at 8:25 AM, Ishan Thakur
>  wrote:
> > “We are setting the documentRoot as “web”(no complete absolute path).
> This
> > works fine for all the paths.
> > The paths can be direct drive(D:\). But it fails only for C drive(C:\).
> The
> > same works fine for all other paths(D:\, C:\Program Files…etc)
> >
> > For C drive, we are getting following error:
> >
> > Syntax error on line 129 of C:/httpd.conf:
> > DocumentRoot must be a directory
> > “
> > Is there any restriction for C drive on Windows for Apache httpd-2.2.31?
>
>
> You'll have to provide some more detail. How does "web" work for
> different drive letters?  Do you specify different server roots in
> different configuration files?
>
> There's nothing special about the C drive when you specify a DocumentRoot.
>
> --
> 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] ProxyPass ! directive

2017-03-10 Thread Matthew Broadhead

i was looking at this message http://markmail.org/message/ne2rdzm5westbcvb

well it doesn't work either way in my case.  is there any way to test 
mod_proxy to find out why it isn't working?  when i first moved to 
CentOS 7 i used an old configuration which worked perfectly on CentOS 6 
but i have never since managed to get it to work.  but now i am 
beginning to need it so it is becoming more urgent!


On 10/03/2017 16:48, Eric Covener wrote:

On Fri, Mar 10, 2017 at 10:43 AM, Matthew Broadhead
 wrote:

yes it is definitely because of that line.  i also just tried

ProxyPass ajp://www.nbmlaw.co.uk:8010/


ProxyPass !

and that has exactly the same effect


That syntax is known to not work. Once you proxy within 

Re: [users@httpd] ProxyPass ! directive

2017-03-10 Thread Eric Covener
On Fri, Mar 10, 2017 at 10:43 AM, Matthew Broadhead
 wrote:
> yes it is definitely because of that line.  i also just tried
> 
> ProxyPass ajp://www.nbmlaw.co.uk:8010/
> 
> 
> ProxyPass !
> 
> and that has exactly the same effect


That syntax is known to not work. Once you proxy within 

Re: [users@httpd] ProxyPass ! directive

2017-03-10 Thread Matthew Broadhead

yes it is definitely because of that line.  i also just tried

ProxyPass ajp://www.nbmlaw.co.uk:8010/


ProxyPass !

and that has exactly the same effect

On 10/03/2017 16:30, Eric Covener wrote:

On Fri, Mar 10, 2017 at 10:24 AM, Matthew Broadhead
 wrote:

Declaring the following directives in a virtual host
ProxyPass "/.well-known/" ! # don't pass lets encrypt folder
ProxyPass "/" ajp://localhost:8010/ # pass root to tomcat server
should result in .well-known folder NOT being proxy passed. However it is
still passed

Are you sure it's proxied as a result of that quoted rule that follows
it, and not another?




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



Re: [users@httpd] ProxyPass ! directive

2017-03-10 Thread Eric Covener
On Fri, Mar 10, 2017 at 10:24 AM, Matthew Broadhead
 wrote:
> Declaring the following directives in a virtual host
> ProxyPass "/.well-known/" ! # don't pass lets encrypt folder
> ProxyPass "/" ajp://localhost:8010/ # pass root to tomcat server
> should result in .well-known folder NOT being proxy passed. However it is
> still passed

Are you sure it's proxied as a result of that quoted rule that follows
it, and not another?


-- 
Eric Covener
cove...@gmail.com

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



[users@httpd] ProxyPass ! directive

2017-03-10 Thread Matthew Broadhead

Operating System:
CentOS7
Operating System Version number:
centos-release-7-3.1611.el7.centos.x86_64
Httpd Version:
httpd-2.4.6-45.el7.centos.x86_64
Issue:
Declaring the following directives in a virtual host
ProxyPass "/.well-known/" ! # don't pass lets encrypt folder
ProxyPass "/" ajp://localhost:8010/ # pass root to tomcat server
should result in .well-known folder NOT being proxy passed. However it 
is still passed


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



[users@httpd] Unsubscribe

2017-03-10 Thread Howard Davies
Please remove my E-mail address from your E-mail list


Thank you


Re: [users@httpd] URG:DocumentRoot relate query on WIndows

2017-03-10 Thread Eric Covener
On Fri, Mar 10, 2017 at 8:25 AM, Ishan Thakur
 wrote:
> “We are setting the documentRoot as “web”(no complete absolute path). This
> works fine for all the paths.
> The paths can be direct drive(D:\). But it fails only for C drive(C:\). The
> same works fine for all other paths(D:\, C:\Program Files…etc)
>
> For C drive, we are getting following error:
>
> Syntax error on line 129 of C:/httpd.conf:
> DocumentRoot must be a directory
> “
> Is there any restriction for C drive on Windows for Apache httpd-2.2.31?


You'll have to provide some more detail. How does "web" work for
different drive letters?  Do you specify different server roots in
different configuration files?

There's nothing special about the C drive when you specify a DocumentRoot.

-- 
Eric Covener
cove...@gmail.com

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



[users@httpd] URG:DocumentRoot relate query on WIndows

2017-03-10 Thread Ishan Thakur
Hi All, We areusing http-2.2.31 for our application on Windows.We arerunning 
our application as Local Service on Windows.
The problem description is as follows:
“We are setting the documentRoot as “web”(no complete absolute path). Thisworks 
fine for all the paths.
The paths can be direct drive(D:\). But it fails only for C drive(C:\).The same 
works fine for all other paths(D:\, C:\Program Files…etc)

For C drive, we are getting following error:

Syntax error on line 129 of C:/httpd.conf:DocumentRootmust be a directory
“
Is there anyrestriction for C drive on Windows for Apache httpd-2.2.31?

Regards,Ishan


Re: [users@httpd] mod_lua and subprocess_env

2017-03-10 Thread Andrei Ivanov
On Tue, Mar 7, 2017 at 7:08 PM, Andrei Ivanov 
wrote:

> On Mon, Mar 6, 2017 at 12:57 PM, Yann Ylavic  wrote:
>
>> Hi Andrei,
>>
>> On Mon, Mar 6, 2017 at 10:15 AM, Andrei Ivanov 
>> wrote:
>>
>>> On Thu, Mar 2, 2017 at 12:40 PM, Andrei Ivanov 
>>> wrote:
>>>
 On Tue, Feb 28, 2017 at 12:09 PM, Andrei Ivanov <
 andrei.iva...@gmail.com> wrote:

> On Mon, Feb 27, 2017 at 11:58 AM, Andrei Ivanov <
> andrei.iva...@gmail.com> wrote:
>
>> On Fri, Feb 24, 2017 at 10:58 PM, Andrei Ivanov <
>> andrei.iva...@gmail.com> wrote:
>>
>>> On Feb 24, 2017 22:54, "Yann Ylavic"  wrote:
>>>
>>> On Fri, Feb 24, 2017 at 6:50 PM, Andrei Ivanov <
>>> andrei.iva...@gmail.com> 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
>> > ​​
>> %{PeerExtList:2.5.29.17}">
>> Header set matched true
>> 
>>
>> Cannot parse condition clause: syntax error, unexpected T_VAR_BEGIN,
>> expecting T_ID or '{
>>
>
> Yann? Any clues? :-)
>

 Ping 

>>>
>>> Hello?
>>>
>>
>> ​Yes sorry, was busy these days ;)
>>
>
> I understand, who isn't? :-)
>
> ​
>> ​Mixing different types (string, boolean, list) of expressions is not
>> working currently, and requires changes in the parser (I'll try to work on
>> this soon).
>>
>> In the meantime, maybe with my patch you could try to (uglily) match
>> "%{PeerExtList:2.5.29.17}" (as a string, hence with the operator "~=")
>> against something like "IP Address:".​%{REMOTE_ADDR}(,|$) ?
>>
>> I've experimented a bit more with your suggestion, still doesn't work :-(
>
> Header set Expr1 "expr='IP Address:'.%{REMOTE_ADDR} -in
> %{PeerExtList:2.5.29.17}"
> Header set Expr2 "expr=%{PeerExtList:2.5.29.17} =~ /%{REMOTE_ADDR}/"
> Header set Expr3 "expr=%{PeerExtList:2.5.29.17} =~ /159.107.78.131/"
>
> Expr1: 'IP Address:'.159.107.78.131 -in email:,
> email:, IP Address:127.0.0.1, IP Address:0:0:0:0:0:0:0:1, IP
> Address:159.107.78.131, IP Address:FE80:0:0:0:6D03:4CE1:C15F:5A44
> Expr2: email:, email:, IP Address:127.0.0.1, IP
> Address:0:0:0:0:0:0:0:1, IP Address:159.107.78.131, IP
> Address:FE80:0:0:0:6D03:4CE1:C15F:5A44 =~ /159.107.78.131/
> Expr3: email:, email:, IP Address:127.0.0.1, IP
> Address:0:0:0:0:0:0:0:1, IP Address:159.107.78.131, IP
> Address:FE80:0:0:0:6D03:4CE1:C15F:5A44 =~ /159.107.78.131/
>
> So for mod_headers the expression isn't fully evaluated...
>
> Header set matched-dynamic false
> 
> Header set matched-dynamic true
> 
> Header set matched-static false
> 
> Header set matched-static true
> 
>
> matched-dynamic: false
> matched-static: true
>
> The match against a dynamic expression fails.
>
> Require expr "PeerExtList('2.5.29.17') =~ /'IP
> Address:'.%{REMOTE_ADDR}(,|$)/"
> Require expr "PeerExtList('2.5.29.17') =~ /'IP
> Address:159.107.78.131'(,|$)/"
>
> These both fail :-(
>
> Thank you for your patience.
>

Hello?