[EMAIL PROTECTED] prespawn of cgi-apps

2008-02-04 Thread Andre Hübner

Hello List,

i use mod_fcgid to start my cgi-applications. http://fastcgi.coremail.cn/
I tried to answer my question with fcgid-documentation. But i think the docs
are a little bit spartan ;)

Is there a possibility to prespawn some apps, for instance php?
i have the problem that some of my users use php (different versions) over
fcgid in their user-context. If the app starts a lot of cpu is consumed by
starting php, after this the parsing of php-file starts.
If i could prespawn this php (maybe 2 or 3 would be enough) i could
distribute cpu-load and result of parsed php-file could provided much
faster.
Are there some recommend settings for different sizes of webservers?
How are your experiences?

Thanks
Andre 



-
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: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Fw: POMOC DLA DZIECKA [potrzebna krew A Rh minus]

2008-02-04 Thread Tomek Lorek
Roześlij gdzie możesz – to bardzo ważne – poszukiwana jest KREW grupy A Rh minus
dla umierającego dziecka – prośba o pomoc MONIKA EBERT 604947367.


[EMAIL PROTECTED] mod_fcgid + Apache 2.2 fcgi server limit

2008-02-04 Thread Johannes Truschnigg
Hello all,

a problem I once believed solved reappears on one of my servers now - it's a 
IA32 box running Gentoo, Apache 2.2.8 w/ mod_fcgid to acchieve per-user PHP5.
I use wrapper scripts like the following to set environmental variables to 
restrict mod_fcgid from spawning too many processes and also have it kill PHP 
instances after a number of requests to avoid potential memory leaks: 
http://pasted.at/ada0ab314d.html

The problem now is that these limits do not seem to apply- Today, I saw my 
httpd spawn a whopping 31 php-cgi processes, just enough that the user's 
ulimit kicks in. I don't want this to happen, and have these values kick in 
instead: http://pasted.at/0d20a81b7d.html

I do not know much about the specific inner workings of mod_fcgid, though if 
the module actually uses signals to end its child-processes, problems should 
arise from the fact that the main apache process is running under a different 
EUID than all its php-cgi childs, right?

Has anyone in here a similar setup up and running, and knows how to avoid the 
situation presented above?

Thanks in advance for your suggestions!
-- 
with best regards:
- Johannes Truschnigg ( [EMAIL PROTECTED] )

www: http://johannes.truschnigg.info/
phone: +43 650 2 17
jabber: [EMAIL PROTECTED]

Please do not bother me with HTML-eMail or attachments. Thank you.


signature.asc
Description: This is a digitally signed message part.


[EMAIL PROTECTED] Disabling basic authentication

2008-02-04 Thread Florian Niedoba
Hi,

This is about disabling basic authentication.
We currently use the following scenario:
We are using mod_auth_sspi to authenticate users via Single Sign On. This
works fine.
Some of our users are not on the Active Directory.
What we want for them is: They hit the URL which protected by the
mod_auth_sspi, it fails and they are forwarded to a different url with a
form based login (401 redirects them).
What happens currently: They are prompted with a basic authenitication
pop-up for username and password, but they don't have a valid AD user so
authentication fails. Now they are forwarded to the other url with the form
based login.
So everything works fine, except that we want to get rid of the basic auth
pop-up.
Is there any chance to suppress it? Any ideas? I think it is actually done
by the browser, is there a way to modify a header or something to pretend
the apache can not handle basic authentication?
About our env: AD as authentication source, all users use IE, we have full
controll over their IE settings, we are using  apache 2.0.59

Thanks, Florian


[EMAIL PROTECTED] Proxy error caoused by mod_authnz_ldap?

2008-02-04 Thread Neil A. Hillard
Hi,

I'm experiencing a problem that I think might be related to
mod_authnz_ldap.

I have a virtualhost configured with the following:

 ProxyPass /jobs/  http://backend.domain.co.uk/public/jobs/admin/

 Location /jobs/
  AuthType basic
  AuthName Jobs Administration
  AuthBasicProvider ldap
  AuthLDAPURL
ldap://ldap.domain.co.uk:389/o=domain?uid?sub?(objectClass=inetOrgPerson)
  AuthzLDAPAuthoritative on

  Require ldap-user username

  RequestHeader unset Authorization
 /Location
LogLevel debug
/VirtualHost


Access generally works but occasionally returns a proxy error with a
reason of 'Error reading from remote server' however a packet capture
shows that Apache didn't even try to establish a connection to
backend.domain.co.uk.

I've upped the logging level to debug and the following is what's logged:

[Mon Feb 04 11:06:54 2008] [debug] mod_authnz_ldap.c(373): [client
192.168.1.1] [28349] auth_ldap authenticate: using URL
ldap://ldap.domain.co.uk:389/o=domain?uid?sub?(objectClass=inetOrgPerson),
referer: http://admin.domain.co.uk/jobs/updated.asp
[Mon Feb 04 11:06:54 2008] [debug] mod_authnz_ldap.c(454): [client
192.168.1.1] [28349] auth_ldap authenticate: accepting username,
referer: http://admin.domain.co.uk/jobs/updated.asp
[Mon Feb 04 11:06:54 2008] [debug] mod_authnz_ldap.c(611): [client
192.168.1.1] [28349] auth_ldap authorise: require user: authorisation
successful, referer: http://admin.domain.co.uk/jobs/updated.asp
[Mon Feb 04 11:06:54 2008] [debug] mod_proxy_http.c(54): proxy: HTTP:
canonicalising URL //backend.domain.co.uk/public/jobs/admin/index.asp
[Mon Feb 04 11:06:54 2008] [debug] proxy_util.c(1335): [client
192.168.1.1] proxy: http: found worker
http://backend.domain.co.uk/public/jobs/admin/ for
http://backend.domain.co.uk/public/jobs/admin/index.asp, referer:
http://admin.domain.co.uk/jobs/updated.asp
[Mon Feb 04 11:06:54 2008] [debug] mod_proxy.c(756): Running scheme http
handler (attempt 0)
[Mon Feb 04 11:06:54 2008] [debug] mod_proxy_http.c(1662): proxy: HTTP:
serving URL http://backend.domain.co.uk/public/jobs/admin/index.asp
[Mon Feb 04 11:06:54 2008] [debug] proxy_util.c(1755): proxy: HTTP: has
acquired connection for (backend.domain.co.uk)
[Mon Feb 04 11:06:54 2008] [debug] proxy_util.c(1815): proxy: connecting
http://backend.domain.co.uk/public/jobs/admin/index.asp to
backend.domain.co.uk:80
[Mon Feb 04 11:06:54 2008] [debug] proxy_util.c(1908): proxy: connected
/public/jobs/admin/index.asp to backend.domain.co.uk:80
[Mon Feb 04 11:06:54 2008] [debug] proxy_util.c(2098): proxy: HTTP:
connection complete to 192.168.1.2:80 (backend.domain.co.uk)
[Mon Feb 04 11:06:54 2008] [info] [client 192.168.1.2] (32)Broken pipe:
core_output_filter: writing data to the network
[Mon Feb 04 11:06:54 2008] [error] [client 192.168.1.1] proxy: error
reading status line from remote server backend.domain.co.uk, referer:
http://admin.domain.co.uk/jobs/updated.asp
[Mon Feb 04 11:06:54 2008] [error] [client 192.168.1.1] proxy: Error
reading from remote server returned by /jobs/index.asp, referer:
http://admin.domain.co.uk/jobs/updated.asp
[Mon Feb 04 11:06:54 2008] [debug] proxy_util.c(1773): proxy: HTTP: has
released connection for (backend.domain.co.uk)


It seems to imply that the connection to the backend server failed
although no packets are ever sent to that server!  The packet capture
shows that the 502 is returned to the client 434 micro-seconds after the
 ldap call returned a success!

I have another virtual host configured on the same server, with an
almost identical configuration except that it has no authentication
configured.  This site has procesed thousands of requests this morning
and not one error!  Whereas the troublesome site has returned 35 errors
out of 443 requests!

Going directly to the backend server works all the time!

One other difference that I've just thought of with this backend server
is that it has two IP addresses (for historical reasons).  Is that known
to cause any problems?

I'm currently running CentOS 5 with Apache 2.2.3 (including all the
patches that RedHat have backported).

Any advice on this problem would be very much appreciated.

Many thanks in advance,


Neil.

-- 
Neil Hillard[EMAIL PROTECTED]
AgustaWestland  http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
views of Westland Helicopters Ltd.

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] language-based redirection

2008-02-04 Thread Nick Kew
On Mon, 4 Feb 2008 11:30:59 -0500
Joshua Slive [EMAIL PROTECTED] wrote:

 On Feb 4, 2008 1:43 AM, Zbigniew Szalbot [EMAIL PROTECTED] wrote:
 
  The thing is that in order to provide blogs in two languages I
  cannot install one blog and make it display in two languages. It
  needs to be two blogs. Hence, they need to be in two separate
  directories. But I am happy to do the langauge recognition in a
  common directory and then redirect to a specific blog. Thank you!
 
 If you want the full language negotiation done by apache (checking
 priorities, etc), then your meta-refresh hack may indeed be the best
 idea.

Meta refresh is never, ever, acceptable.  It buggers up browsers.

Looking up the thread, an altogether better solution would be
to use mod_asis to generated external redirects from the
content-negotiated indexes.

You should still of course enable users to override that choice.
For example a visitor may be fluent in both languages, or may be
traveling, and using a hotel or library's browser configured with
different preferences to their own.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] vhosts, 403 error, file recognized as directory. .htaccess

2008-02-04 Thread Alexandre Leray

Hi,

I have a really strange problem with my apache conf.
I'm running Gentoo on a powerbook. In order not to duplicate my files, I
defined some of my virtual hosts in my OSX HFSPLUS partition.

I'm getting this error :

[Mon Feb 04 18:15:36 2008] [crit] [client 127.0.0.1] (13)Permission
denied: /mnt/stock/www/techday/htdocs/test.html/.htaccess pcfg_openfile:
unable to check htaccess file, ensure it is readable

I was thinking it was a problem with the HFSPLUS, but it seems not
because I tested document root on my main linux partition, and stiil get
the same error. My permissions are right.

I don't get error on index files, and If I want to avoid the 403 error
and the other pages I have to chmod +x !

I don't get why apache interpret  my html file as a directory.
(test.html/.htaccess).

Any idea ?

Thanks a lot


-
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: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] language-based redirection

2008-02-04 Thread Nick Kew
On Mon, 4 Feb 2008 18:23:35 +0100
Zbigniew Szalbot [EMAIL PROTECTED] wrote:

 Only this? Or should the header contain this:
 
 Status: 301 Now where did I leave that URL
 Location: http://xyz.abc.com/foo/bar.html
 Content-type: text/html

Yep.  Get that up-and-running with mod_asis, then plug it in to
what you've got.

You can return an HTML stub (like Apache's default 301 ErrorDocument)
just in case anyone ever looks at it.


-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] language-based redirection

2008-02-04 Thread Zbigniew Szalbot
Hello,

2008/2/4, Joshua Slive [EMAIL PROTECTED]:
 On Feb 4, 2008 1:43 AM, Zbigniew Szalbot [EMAIL PROTECTED] wrote:

  The thing is that in order to provide blogs in two languages I cannot
  install one blog and make it display in two languages. It needs to be
  two blogs. Hence, they need to be in two separate directories. But I
  am happy to do the langauge recognition in a common directory and then
  redirect to a specific blog. Thank you!

 If you want the full language negotiation done by apache (checking
 priorities, etc), then your meta-refresh hack may indeed be the best
 idea. (I almost never suggest that, since it is much better to do
 proper HTTP redirects. But this is a special case. I don't know a
 clean way to get mod_negotiation to generate an external redirect.)

 If you just want to do a simple scan of the browser's accept-language,
 you can use mod_rewrite:

 RewriteCond %{HTTP:Accept-Language} ^pl$
 RewriteRule ^/blog/?$ http://yoursite.example.com/blog/pl/ [R,L]
 RewriteRule ^/blog/?$ http://yoursite.example.com/blog/en/ [R]

I will probably stick with meta-refresh as the above does not seem to
work (I put the directive in a .htaccess file).

Anyway, thank you very, very much for your contribution!

Zbigniew Szalbot

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Proxy error caoused by mod_authnz_ldap?

2008-02-04 Thread Nick Kew
On Mon, 04 Feb 2008 11:37:33 +
Neil A. Hillard [EMAIL PROTECTED] wrote:

 One other difference that I've just thought of with this backend
 server is that it has two IP addresses (for historical reasons).  Is
 that known to cause any problems?

No, but can you clarify: is this the same backend as you're using
with the reliable/no-ldap virtualhost?  If not, is there a possibility
to, say, run ldap-authenticated tests on the good backend?

 I'm currently running CentOS 5 with Apache 2.2.3 (including all the
 patches that RedHat have backported).

FWIW, there are a lot of proxy improvements since 2.2.3.
That includes a patch to PR#37770, which could be relevant.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] language-based redirection

2008-02-04 Thread Joshua Slive
On Feb 4, 2008 1:43 AM, Zbigniew Szalbot [EMAIL PROTECTED] wrote:

 The thing is that in order to provide blogs in two languages I cannot
 install one blog and make it display in two languages. It needs to be
 two blogs. Hence, they need to be in two separate directories. But I
 am happy to do the langauge recognition in a common directory and then
 redirect to a specific blog. Thank you!

If you want the full language negotiation done by apache (checking
priorities, etc), then your meta-refresh hack may indeed be the best
idea. (I almost never suggest that, since it is much better to do
proper HTTP redirects. But this is a special case. I don't know a
clean way to get mod_negotiation to generate an external redirect.)

If you just want to do a simple scan of the browser's accept-language,
you can use mod_rewrite:

RewriteCond %{HTTP:Accept-Language} ^pl$
RewriteRule ^/blog/?$ http://yoursite.example.com/blog/pl/ [R,L]
RewriteRule ^/blog/?$ http://yoursite.example.com/blog/en/ [R]

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Proxy error caoused by mod_authnz_ldap?

2008-02-04 Thread Neil A. Hillard
Nick,

Nick Kew wrote:
 On Mon, 04 Feb 2008 11:37:33 +
 Neil A. Hillard [EMAIL PROTECTED] wrote:
 
 One other difference that I've just thought of with this backend
 server is that it has two IP addresses (for historical reasons).  Is
 that known to cause any problems?
 
 No, but can you clarify: is this the same backend as you're using
 with the reliable/no-ldap virtualhost?  If not, is there a possibility
 to, say, run ldap-authenticated tests on the good backend?

Sadly not - nothing's ever that simple!  I could however configure
another virtual host with authentication, pointing to the
(non-troublesome) backend.


 I'm currently running CentOS 5 with Apache 2.2.3 (including all the
 patches that RedHat have backported).
 
 FWIW, there are a lot of proxy improvements since 2.2.3.
 That includes a patch to PR#37770, which could be relevant.

Just had a speed-read of that one, although there's lots of mention of
the problem occurring with the worker mpm.  FWIW we're using prefork mpm
as there's a lot of PHP code being served.

I have however added:

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

to the virtual host and will now get the users to test...

Many thanks,


Neil.

-- 
Neil Hillard[EMAIL PROTECTED]
AgustaWestland  http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
views of Westland Helicopters Ltd.

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] modifying header in request

2008-02-04 Thread Cenk Oguz
Hi!

I am currently trying to add the REMOTE_USER environment variable into a 
response header or forward header (using mod_jk).

However we also need to strip the first few characters of the REMOTE_USER when 
adding it to the header.

We are adding the header to the request response using mod_headers, however in 
apache 2.0 mod_headers does not support modifying a header using the edit 
action with regexps.

We have noticed the edit action for mod_headers directives only exist in 
apache 2.2.

Is there any way of doing this modification of REMOTE_USER when adding it to a 
header without upgrading to Apache 2.2? We can not do so due to other module 
dependencies.

Regards,
Cenk

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] RewriteRule: foo.com/directory -- foo.com/directory/

2008-02-04 Thread thomas Armstrong
Hi.

Using Apache 2, I want to create a RewriteRule within the '.htaccess'
file which redirects from:
http://foo.com/directory
to
http://foo.com/directory/

This last directory is a RewriteRule:
--
RewriteRule ^([^/]+)/$ /directory.php?label=$1 [L]
-

I tried adding this line
-
RewriteRule ^(.*)$ /$1/ [R=301]
-
after and before the last line, but I get this error message:
--
The page isn't redirecting properly
--

and the URL I get is:
http://foo.com/directory.php/?label=directory.php

What am I doing wrong? Thank you very much.

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] modifying header in request

2008-02-04 Thread Eric Covener
On Feb 4, 2008 3:14 PM, Cenk Oguz [EMAIL PROTECTED] wrote:
 Hi!

 I am currently trying to add the REMOTE_USER environment variable into a 
 response header or forward header (using mod_jk).

 However we also need to strip the first few characters of the REMOTE_USER 
 when adding it to the header.

 We are adding the header to the request response using mod_headers, however 
 in apache 2.0 mod_headers does not support modifying a header using the 
 edit action with regexps.


Can you use a rewritecond to capture what you want, drop it in a new
envvar [E=FOO:BAR], then use mod_headers to set the response header
from your the new envvar?

-- 
Eric Covener
[EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] RewriteRule: foo.com/directory -- foo.com/directory/

2008-02-04 Thread Eric Covener
On Feb 4, 2008 5:20 PM, thomas Armstrong [EMAIL PROTECTED] wrote:
 I tried adding this line
 -
 RewriteRule ^(.*)$ /$1/ [R=301]
 -

 The page isn't redirecting properly

At least protect it from running when the URL ends in a slash such as:

RewriteRule ^(.*[^/])$ /$1/ [R=301]

You're unexpected behavior is a result of doing rewrite in .htaccess,
so the rules are re-visited at a later stage despite the L flag.
-- 
Eric Covener
[EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] language-based redirection

2008-02-04 Thread Zbigniew Szalbot
Hello,

2008/2/4, Nick Kew [EMAIL PROTECTED]:
 On Mon, 4 Feb 2008 11:30:59 -0500
 Joshua Slive [EMAIL PROTECTED] wrote:

  On Feb 4, 2008 1:43 AM, Zbigniew Szalbot [EMAIL PROTECTED] wrote:
 
   The thing is that in order to provide blogs in two languages I
   cannot install one blog and make it display in two languages. It
   needs to be two blogs. Hence, they need to be in two separate
   directories. But I am happy to do the langauge recognition in a
   common directory and then redirect to a specific blog. Thank you!
 
  If you want the full language negotiation done by apache (checking
  priorities, etc), then your meta-refresh hack may indeed be the best
  idea.

 Meta refresh is never, ever, acceptable.  It buggers up browsers.

 Looking up the thread, an altogether better solution would be
 to use mod_asis to generated external redirects from the
 content-negotiated indexes.

 You should still of course enable users to override that choice.
 For example a visitor may be fluent in both languages, or may be
 traveling, and using a hotel or library's browser configured with
 different preferences to their own.

Thanks Nick. I did have a loot at:
http://webauth.stanford.edu/manual/mod/mod_asis.html

Now, what I do not understand is what should the HTML file contain.

html
head
titleLame excuses'R'us/title
/head
body
h1Fred's exceptionally wonderful page has moved to
a href=http://xyz.abc.com/foo/bar.html;Joe's/a site.
/h1
/body
/html

Only this? Or should the header contain this:

Status: 301 Now where did I leave that URL
Location: http://xyz.abc.com/foo/bar.html
Content-type: text/html

I do not really want to show people a page moved message as nothing
has moved. I just want to redirect to two different subdirectories
based on browser's language.

Thanks!

Zbigniew Szalbot

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]