[us...@httpd] default values changed in httpd.conf from 2.2.15 to 2.2.3?

2010-07-16 Thread Bennett Haselton
I'm working my way through some instructions on how to build my own 
copy of Apache and then copy it over in place of my existing Apache.


My existing Apache is version 2.2.15, and the new one that I built 
from source, is version 2.2.3.  The httpd.conf file from the old 
Apache has some lines in it like:


Timeout 120

I know what all of those lines mean, but I'm confused because they 
don't exist in the httpd.conf file for the new Apache 2.2.3 that I 
built from source.  And there's a directory /root/httpd/conf 
containing other .conf files that can be optionally loaded by 
uncommenting other lines in the Apache 2.2.3 httpd.conf file, but I 
searched those files and none of them contain a "Timeout" line, either.


Other directives, like KeepAlive, are defined in 
/root/httpd/conf/extra/httpd-default.conf, but those conf files are 
commented out by default in httpd.conf.


So, where does Apache 2.2.3 get its values for things like "Timeout" 
and "KeepAlive", does it just use hard-coded values that are used by 
defaults when the values aren't specified in the conf files?


Was there a general shift sometime between 2.2.15 and 2.2.3 regarding 
the philosophy of what should be specified in conf files -- 2.2.15 
seems to specify values in the confs and depend on you to change 
them, whereas 2.2.3 doesn't specify values at all and depends on you 
to *add* (or uncomment) the lines if you want to use them.  (I like 
the old way better, since then you could see what values your 
existing Apache was using, before you added lines changing those values!)


-Bennett


-
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] where is 'apr-1-config'?

2010-07-16 Thread Bennett Haselton
I emailed the author of the modlogslow module asking for help 
installing it on CentOS 5.5, and he sent me back instructions that 
included this step:


>>>
2. compile

# first, get link switch(es) for linking to APR by apr-1-config
$ /___path-to-apache-bin___/apr-1-config --link-ld

ex.
/home/apache-2.2.2/bin/apr-1-config --link-ld
   -L/home/apache-2.2.2/lib -lapr-1
>>>

I replied that I didn't have a file called "apr-1-config" on my 
machine, and that there were no files with *apr* names in the 
/usr/sbin/ directory, which is where my httpd executable 
lives.  Unfortunately I didn't hear back from him after that.


I have googled "apr-1-config" but couldn't find any info.  If he 
assumes that file is on my machine, is he making some assumption 
about my machine?  (e.g. is this file only present on machines where 
Apache was built from source? because mine was provisioned for me by 
the hosting company and it doesn't have the Apache source on it).


-Bennett


-
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] 2 reverse proxy to serve an application

2010-07-16 Thread Tapas Mishra
Since I  set "ProxyPreserveHost On", so the hostname I  use for
ProxyPass at B is irrelevant.
The request sent by server A to server B will always have the same
hostname as the request received by server A.
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost

That is why I have asked this question.How do I change the hostname of
incoming request.
Since if I do not preserver Hostname for a request which goes to B
with site2.abc.com then the application would not be able to maintain
session for logged in users.
So I have to preserve the requested hostname.
But for /application I have transfer it some how this thing I am not getting.

-
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] 2 reverse proxy to serve an application

2010-07-16 Thread Tapas Mishra
A-B-C

request from internet comes at A it forwards that to B and then B
 checks if it has to send that request to C or it can serve that from B itself.

I am posting the configurations.

site1.abc.com
site2.abc.com
site3.abc.com
site4.abc.com

these sites above are having domain names which have been registered.

Any request to any of them i.e. site1.abc.com or site3.abc.com

Comes at A

Following is vhost configuration at A
for

site2.mydomain.com



ServerAdmin webmas...@localhost
ServerName site2.mydomain.com   
ProxyRequests off

Order deny,allow
Allow from all


ProxyPreserveHost On


ProxyPass /application http://nirvana/
ProxyPassReverse /application http://nirvana/

ProxyPass / http://server2
ProxyPassReverse / http://server2




Where server2 is B in above diagram.
and /application is forwarded to B which in turn forward to C.
In above configuration nirvana and server2 are both pointing to same server B.


Following is configuration of Server B

for a request that comes with a server name for nirvana


ServerAdmin webmas...@localhost
ServerName nirvana
ServerAlias

ProxyRequests Off

 
Order deny,allow
Allow from all


ProxyPreserveHost On
ProxyPass / http://papaserver:9090/portal
ProxyPassReverse / http://papaserver:9090/portal



Where papaserver is Server C which is a tomcat instance.Not apache and
on C I can access it by

http://localhost:9090/portal

Server B is serving a request which comes for a
ServerName nirvana and also
ServerName site2.abc.com

A request that comes for nirvana that has to be forwarded to C such that

on internet any one if types
http://site2.abc.com/application

he can see the same content which I see as
http://localhost:9090/portal on physically opening a browser at C.

My problem is if a request originally is coming for site2.abc.com
and I have kept ProxyPreserveHost On then orginial hostname requested
is preserved in this process which is site2.abc.com
but for a request for site2.abc.com/application
I need to proxy it to Server B so that Server B can respond with a
different hostname than site2.abc.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] fastcgi

2010-07-16 Thread Jeff Trawick
On Thu, Jul 15, 2010 at 6:47 PM,   wrote:
> Hi,
>
> I fellow instruction to install mod_fcgid-2.3.5, but how can I know
> fastcgi is running instead of cgi?

1 or more of the following:

a. set LogLevel to Debug and watch a fair amount of noise from
mod_fcgid when handling requests
b. your script program is persistent, even after request handling has finished
c. you comment out the LoadModule for mod_cgi or mod_cgid and it still works
d. you enable server-status (mod_status), view the report, and
mod_fcgid lists your FastCGI program as one of the managed processes
(probably several more simple checks)

-
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: Custom ErrorDocument

2010-07-16 Thread Eric Covener
On Fri, Jul 16, 2010 at 5:47 AM, Mauri  wrote:
>
> one more information.
> If I write
> ErrorDocument 503 "messagge"
>
> it work fine, but If I write
> ErrorDocument 503 /test.html
> it don't work. for me this is the problem:

That's because you're proxying everything.  Read the manual for the
ProxyPass syntax to exclude certain URLS.

-- 
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] Re: Custom ErrorDocument

2010-07-16 Thread Mauri
one more information.
If I write
ErrorDocument 503 "messagge"

it work fine, but If I write
ErrorDocument 503 /test.html
it don't work. for me this is the problem:

filelog_ssl_error_log:[Thu Jul 15 20:58:46 2010] [debug] proxy_util.c(1488):
[client 10.173.202.139] proxy: https: found worker
https://10.173.100.117:8443/ for
https://10.173.100.117:8443/test.html

the file test.html is a local file in /var/www/error/test.html

Thanks for any suggest.

Cheers,
Mauri


2010/7/15 Mauri 

>
> Hi expert,
> where I can insert the ErrorDocument directive in my ssl.conf virtualhost ?
> this is my virtualhost directive
>
> NameVirtualHost myserver:443
> 
> ServerName myserver
> ProxyRequests off
> ProxyPass / https://10.173.100.117:8443/
> ProxyHTMLURLMap https://10.173.100.117:8443 /
> 
> ProxyPassReverse https://10.173.100.117:8443/
> ProxyHTMLEnable On
> ProxyHTMLURLMap  /  /
> RequestHeaderunset  Accept-Encoding
> 
> ..SSL Directive..
> 
>
> if I insert this directive:
>
> DocumentRoot /var/www/error
> 
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> 
> ErrorDocument 503 /test.html
>
> this is the entry in my apache log (wrong):
> filelog_ssl_error_log:[Thu Jul 15 20:58:46 2010] [debug]
> mod_proxy_http.c(56): proxy: HTTP: canonicalising URL //
> 10.173.100.117:8443/test.html 
> filelog_ssl_error_log:[Thu Jul 15 20:58:46 2010] [debug]
> proxy_util.c(1488): [client 10.173.202.139] proxy: https: found worker
> https://10.173.100.117:8443/ for 
> https://10.173.100.117:8443/test.html
> filelog_ssl_error_log:[Thu Jul 15 20:58:46 2010] [debug]
> mod_proxy_http.c(1960): proxy: HTTP: serving URL
> https://10.173.100.117:8443/test.html
>
> I want that if the backend application is down (
> https://10.173.100.117:8443/) the proxy send to client the local file
> /var/www/error/test.html
>
> many thanks for any sugget.
>
> Cheers,
> Mauri
>


Re: [us...@httpd] Apache 2.2.11 mod_proxy returns 503 (service unavailable) under load

2010-07-16 Thread alin vasile
Hi,

 Since in  your apache logs you can see a  timeout while connecting to the 
backend :

  "[Wed Jul 14 15:59:46 2010] [error] (110)Connection timed out: proxy:
HTTP:  attempt to connect to 1xx.7x.xxx.xxx:80 (web.mycompany.net)
failed"

  it is normal that there not to have any logs at that time. 

  The problem here is that your backend may not support a spike load or can 
hove 
some capacity problems.





From: pratyoosh sharma 
To: users@httpd.apache.org
Sent: Fri, July 16, 2010 7:10:34 AM
Subject: [us...@httpd] Apache 2.2.11 mod_proxy returns 503 (service 
unavailable) 
under load

We are running a high volume portal that uses Apache 2.2.11 mod_proxy
to reverse proxy content from downstream apache-> application servers,
we recently started observing 503 errors on the Apache which happen
sporadically throughout the day during activity on random requests.

The requests returned with 503 don't appear on the backend apache
access logs at all, there are no 503 failures on backend
apache.Network traces of connectivity between frontend apache & the
backend don't reveal anything either.

An interesting pattern is the failed requests always take ~3-4 seconds

Frontend Apache:
Error log:
[Wed Jul 14 15:59:46 2010] [error] (110)Connection timed out: proxy:
HTTP: attempt to connect to 1xx.7x.xxx.xxx:80 (web.mycompany.net)
failed
[Wed Jul 14 15:59:46 2010] [error] ap_proxy_connect_backend disabling
worker for (web.mycompany.net)
Access log:
"USER13" xx.xx.xxx.xxx - [14/Jul/2010:15:59:43 -0400] "GET
/myapp/web/css/ext-all.css HTTP/1.1" 503 1030  3041412

Backend:
This request never reached the backend server & doesn't shows up in
the access logs of backend server


All the failing requests like the above take ~3 seconds so i guess its
like a timeout but i can't find any such configuration.

Is there some known Apache bug for this behavior? We have retry=0 &
disablereuse on for all proxy pass directives

What kind of starvation should i look for in Apache we have mod_status
enabled, file descriptor limit set a 64K, CPU is almost always idle &
25 Gig memory free on the server.

Thanks

-
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