RE: [us...@httpd] RE: Where should I start Logging..... ?

2010-06-15 Thread Karthik Nanjangude
Hi

Is there a Timestamp validation in Apache before which the "Bad Gate way is 
displayed ?

If yes where need to fine tune
If no  What is the cause of this Bad Gate way at Apache level ,if the  Web 
container at internal port is displaying the correct info ?




With regards
karthik

-Original Message-
From: Eric Covener [mailto:cove...@gmail.com]
Sent: Monday, June 14, 2010 5:58 PM
To: users@httpd.apache.org
Subject: Re: [us...@httpd] RE: Where should I start Logging. ?

On Mon, Jun 14, 2010 at 7:37 AM, Karthik Nanjangude
 wrote:
> Hi
>
> Can any body can Enlighten me for the same ... Please

Look in whatever module connects JBOSS with Apache.


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

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] RE: Where should I start Logging..... ?

2010-06-15 Thread Eric Covener
On Tue, Jun 15, 2010 at 6:52 AM, Karthik Nanjangude
 wrote:
> Hi
>
> Is there a Timestamp validation in Apache before which the "Bad Gate way is 
> displayed ?
>
> If yes where need to fine tune
> If no  What is the cause of this Bad Gate way at Apache level ,if the  Web 
> container at internal port is displaying the correct info ?
>
>

Do you use mod_proxy_http or some proprietary plugin?

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

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tapas Mishra
http://http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html

 is a link to a tutorial which mentions following use of ReWriteRule is wrong.

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .+ http://www.askapache.com%{REQUEST_URI}

I could not understand what is the mistake in the above rule?
Can some one point what is the error which the tutorial is trying to tell.

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tom Evans
On Tue, Jun 15, 2010 at 1:42 PM, Tapas Mishra  wrote:
> http://http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html
>
>  is a link to a tutorial which mentions following use of ReWriteRule is wrong.
>
> RewriteEngine On
> RewriteBase /
>
> RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
> RewriteRule .+ http://www.askapache.com%{REQUEST_URI}
>
> I could not understand what is the mistake in the above rule?
> Can some one point what is the error which the tutorial is trying to tell.
>

I don't know what he's smoking, I use a rule almost identical to that
in many places.
Perhaps it behaves differently in .htaccess configuration, which is
what he is describing.

The rule I use on a daily basis:

RewriteCond %{HTTP_HOST} !^(altname\.example\.com|name\.example\.com)$
RewriteRule ^/(.*)  http://name.example.com/$1 [R=301,L]

Also, his point about not being able to see what the various variables
are, I kind of see his point, it would be nice to have examples of
what the variables could be, but you can always turn on the rewrite
log to see stuff like that.

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Eric Covener
On Tue, Jun 15, 2010 at 8:42 AM, Tapas Mishra  wrote:
> http://http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html
>
>  is a link to a tutorial which mentions following use of ReWriteRule is wrong.
>
> RewriteEngine On
> RewriteBase /
>
> RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
> RewriteRule .+ http://www.askapache.com%{REQUEST_URI}
>
> I could not understand what is the mistake in the above rule?
> Can some one point what is the error which the tutorial is trying to tell.

Who can guess if that silly page meant either of these subtle issues
with the recipe:

*) ".+" in .htaccess won't match a request for "/", but I doubt that's
the operative part of the exercise.
*) You Should not redirect if HTTP_HOST is empty, for HTTP/1.0
clients, or you might loop.

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

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tom Evans
On Tue, Jun 15, 2010 at 2:19 PM, Eric Covener  wrote:
> Who can guess if that silly page meant either of these subtle issues
> with the recipe:
>
> *) ".+" in .htaccess won't match a request for "/", but I doubt that's
> the operative part of the exercise.
> *) You Should not redirect if HTTP_HOST is empty, for HTTP/1.0
> clients, or you might loop.
>
> --
> Eric Covener
> cove...@gmail.com
>

Hi Eric

wrt your second point, it's been my understanding that if you are
using name based virtual hosting, then HTTP/1.0 clients will always be
directed to the first virtual host, and so it is fine to not check for
empty HTTP_HOST in name based virtual hosts, when canonicalizing the
host name. Is this accurate?

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Eric Covener
On Tue, Jun 15, 2010 at 9:39 AM, Tom Evans  wrote:
> On Tue, Jun 15, 2010 at 2:19 PM, Eric Covener  wrote:
>> Who can guess if that silly page meant either of these subtle issues
>> with the recipe:
>>
>> *) ".+" in .htaccess won't match a request for "/", but I doubt that's
>> the operative part of the exercise.
>> *) You Should not redirect if HTTP_HOST is empty, for HTTP/1.0
>> clients, or you might loop.
>>
>> --
>> Eric Covener
>> cove...@gmail.com
>>
>
> Hi Eric
>
> wrt your second point, it's been my understanding that if you are
> using name based virtual hosting, then HTTP/1.0 clients will always be
> directed to the first virtual host, and so it is fine to not check for
> empty HTTP_HOST in name based virtual hosts, when canonicalizing the
> host name. Is this accurate?
>

not sure -- may not be a practical concern for the reasons you
describe (and I didn't test that aspect)

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

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tapas Mishra
On Tue, Jun 15, 2010 at 6:49 PM, Eric Covener  wrote:

> *) You Should not redirect if HTTP_HOST is empty, for HTTP/1.0
> clients, or you might loop.

 I could not understand your statement HTTP_HOST empty can you be a
bit explanatory.It will help newbies like me.

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tom Evans
On Tue, Jun 15, 2010 at 3:33 PM, Tapas Mishra  wrote:
> On Tue, Jun 15, 2010 at 6:49 PM, Eric Covener  wrote:
>
>> *) You Should not redirect if HTTP_HOST is empty, for HTTP/1.0
>> clients, or you might loop.
>
>  I could not understand your statement HTTP_HOST empty can you be a
> bit explanatory.It will help newbies like me.
>

HTTP/1.0 clients do not send a Host header in the request
  => no host information can be inferred from a request
  => HTTP_HOST will be empty.

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tapas Mishra
>
> HTTP/1.0 clients do not send a Host header in the request
>  => no host information can be inferred from a request
>  => HTTP_HOST will be empty.
but if HTTP_HOST is empty then from where is the reply coming from ?


-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tom Evans
On Tue, Jun 15, 2010 at 3:41 PM, Tapas Mishra  wrote:
>>
>> HTTP/1.0 clients do not send a Host header in the request
>>  => no host information can be inferred from a request
>>  => HTTP_HOST will be empty.
> but if HTTP_HOST is empty then from where is the reply coming from ?
>

I dont understand what you are asking? - the reply comes from apache.
HTTP_HOST is a variable that holds the value of the http header
'Host'. If the browser doesn't send one, it isn't going to have a
value.

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tapas Mishra
On Tue, Jun 15, 2010 at 8:16 PM, Tom Evans  wrote:
>
> I dont understand what you are asking? - the reply comes from apache.
I could not understand I am newcomer to apache.I have used Reverse
Proxy and other settings but do not completely understand it.
So trying to understand how apache behaves when it gets a request to
serve a webpage what is happening in background.

> HTTP_HOST is a variable that holds the value of the http header
> 'Host'. If the browser doesn't send one, it isn't going to have a
> value.

What is Host in this reply which you are referring to.

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] rewrite rule tutorial on ask apache I could not understand syntax

2010-06-15 Thread Tom Evans
On Tue, Jun 15, 2010 at 3:56 PM, Tapas Mishra  wrote:
> On Tue, Jun 15, 2010 at 8:16 PM, Tom Evans  wrote:
>>
>> I dont understand what you are asking? - the reply comes from apache.
> I could not understand I am newcomer to apache.I have used Reverse
> Proxy and other settings but do not completely understand it.
> So trying to understand how apache behaves when it gets a request to
> serve a webpage what is happening in background.
>
>> HTTP_HOST is a variable that holds the value of the http header
>> 'Host'. If the browser doesn't send one, it isn't going to have a
>> value.
>
> What is Host in this reply which you are referring to.
>

Host is a request header sent with HTTP/1.1 requests indicating the
host that the user requested.
Apache reads that header in and stores it on the request.
mod_rewrite makes that variable available to read with the name HTTP_HOST.

If the request is a HTTP/1.0 request, no host header is sent, so
HTTP_HOST will be empty if examined.

I can't explain the HTTP protocol + Apache on a mailing list. Do what
I did and read RFC 2616 to understand HTTP, and read "Apache modules
with Perl and C" to understand Apache (although it is a little dated
now, it has an excellent section on the request life cycle). This may
also help:

http://stein.cshl.org/~lstein/talks/perl_conference/apache_api/lifecycle.html

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] Apache getting stuck with all workers in a BUSY_READ state

2010-06-15 Thread David Fallon
Hi, I've been having problems with apache becoming unresponsive, and
was wondering if anyone had any suggestions on what the problem might
be. Basically, periodically, apache will get into a state where all
the workers are stuck reading:

Server Version: Apache
Server Built: Oct 21 2009 10:54:43
Current Time: Tuesday, 15-Jun-2010 07:57:30 PDT
Restart Time: Tuesday, 15-Jun-2010 06:37:33 PDT
Parent Server Generation: 0
Server uptime:  1 hour 19 minutes 57 seconds
Total accesses: 985801 - Total Traffic: 8.1 GB
CPU Usage: u644.89 s203.76 cu3994.75 cs0 - 101% CPU load
206 requests/sec - 1.7 MB/second - 8.6 kB/request
1593 requests currently being processed, 15 idle workers
RCKRRRKR
CRRR
RRCK


KRRR
RRCR

RKRR
RRCRRKRRRKRK
RRRK
RKRR

RRRKRKRR



RWRR

RRRWKKCRRKRKKRRC
RRKK
RRKR
CKCCRRKRRRKRRRCRCCRRRCRRCRRR
RRRKKRRWRKRRRKRW
KKRRRKWRKRRRW___RRR__RR___R_
WRR__RRRSS..







This is prior to complete failure - sometimes whatever's blocking gets
unblocked before it hits max clients, sometimes it doesn't. I'm
running apache 2.0.59 built with openssl 0.9.8n on AIX 6.1 with
prefork, and this is virtually all SSL traffic (pretty much everything
other than the scoreboard). A restart basically "fixes" the problem,
from the perspective that all the workers get killed and after the
initial thrashing of starting up new workers.

>From my understanding of the READ state above, everything above is
stuck in one of two broad categories:

 - A client made the TCP connection to the server, and is somewhere
between the tcp handshake and the end of the HTTP Request info. This
suggests it could be a network issue (something's hanging the
connections), or an openssl issue (the TLS/SSL negotiation is
slow/hanging), or...?
 - The request has been completed, but we're proxying to somewhere
else and waiting for a response from the proxy. This potentially
applies in this case, because we do have apache setup to proxy some
URLs to another server.

There's nothing in the access or error logs jumping out to correlate
with this problem either - There are MaxClient issues once it hits
that, of course, but nothing related to the BUSY_READ state.

 When having the problem, I've correlated the scoreboard with the
ps/lsof/netstat output, and the second case seems unlikely because I'm
not seeing any open connections to the server that apache is proxy'ing
to. It feels like there's some shared resource that all the apache
workers are trying to access, but I can't figure out what it might be.
Any suggestions on a solution, or how I might get more info out of
apache as to what it's doing while everyone's in the read state? Are
there other broad categories I'm missing as to why the workers might
be in the read state? Any further info I could provide to help anyone?
My next steps are to dive into the apache source further and see what
possible resources it could be blocking on, but I'm hoping someone
smarter than me already knows. :)


-- 
Dave Fallon

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.a

[us...@httpd] I/O accounting for all processes?

2010-06-15 Thread Jakov Sosic
Hi to all.

I'm interested in measuring I/O that all apache processes are
generating. Is that possible somehow? I know that on Linux, after 2.6.28
there is I/O accounting per PID, but that's not satisfying for me
because apache PIDs in prefork mode change and are not the same...

I need this to calculate I/O needed for my load balancing cluster.

I'm open to all ideas...



-- 
|Jakov Sosic|ICQ: 28410271|   PGP: 0x965CAE2D   |
=
| start fighting cancer -> http://www.worldcommunitygrid.org/   |

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] mod_nss + OCSP configuration problem

2010-06-15 Thread Aruna Gummalla
Hi, 

I am having trouble in bringing up my Apache httpd server with the mod_nss 
configuration  (with OCSP).

I changed the nss.conf to have the following configuration

NSSCertificateDatabase /usr/local/apache/nss
NSSVerifyClient require
NSSOCSP on
NSSOCSPDefaultResponder on
NSSOCSPDefaultURL http://myip:3456
NSSOCSPDefaultName my_ocsp

I have a openssl OCSP server running like this 

openssl ocsp -index index.txt -CA cacert.pem -rsigner cacert.pem -rkey 
private/cakey.pem -port 3456

But when i start the Apache httpd server, I see the following error:

Certificate not verified: 'Server-Cert'
SSL Library Error: -8063 The response from the OCSP server was corrupted or 
improperly formed.

I am new to OCSP and would really appreciate any help on this.

Thanks in advance.

Thanks & Regards,
Aruna.


  

Re: [us...@httpd] I/O accounting for all processes?

2010-06-15 Thread Scott Gifford
On Tue, Jun 15, 2010 at 5:33 PM, Jakov Sosic  wrote:

> I'm interested in measuring I/O that all apache processes are
> generating.


I used mod_logio to solve a similar problem not too long ago, with good
success:

http://httpd.apache.org/docs/2.0/mod/mod_logio.html


Scott.


Re: [us...@httpd] Apache getting stuck with all workers in a BUSY_READ state

2010-06-15 Thread Scott Gifford
On Tue, Jun 15, 2010 at 1:02 PM, David Fallon  wrote:
[ ... ]

> Any suggestions on a solution, or how I might get more info out of
> apache as to what it's doing while everyone's in the read state?


I would try using strace (or ktrace or truss depending on your OS) on the
processes to see what they are doing.  Between that and lsof you should be
able to tell what the process is blocked reading.

Hope this is helpful,

Scott.


[us...@httpd] 100% CPU utilization by Apache

2010-06-15 Thread Tapas Mishra
I am having a front end server as Apache for hosting many websites.
Today morning any of my domains were not accessible until I did an SSH
to Apache server and saw
100% CPU utilization by Apache
http://farm5.static.flickr.com/4018/4704885995_cfdb374ca8_b.jpg
I am using Ubuntu 10.04 what can be reason for this behaviour of
Apache and what should I check.


-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org