You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jan-Hendrik Palic <jp...@tng.de> on 2011/07/21 12:28:47 UTC

[users@httpd] Configure apache to chroot vhosts

Hi there,

I am working on Ubuntu 10.04 LTS and try get apache chrooting its 
vhosts. I followed the HowTo from

http://e.metaclarity.org/268/httpdsuexecchrootfastcgiphp/.

It describes the way to get apache chrooting two different vhosts with 
suexec,php5 and fastcgi and provides some patches to get suexec working 
with chroot _and_ php5.

In opposite to the HowTo I use the Debianpackage of apache, php and 
fastcgi from the Ubuntu repositories for 10.04, so the versions are 
different. The patches provided by the HowTo are included to the package 
buildsystem as one patch (I will attach it here).

Ok, I adapted the HowTo for my construction, die paths and names for 
domains and users are not the same as in the HowTo.

Static html pages work, but php5 not. The following will be seen in my logs:

Access:
213.178.67.141 - - [20/Jul/2011:15:45:37 +0200] "GET /index.php 
HTTP/1.1" 500 635 "-" "Mozilla/5.0 (X11; Linux i686; rv:6.0) 
Gecko/20100101 Firefox/6.0"

Error:
[Wed Jul 20 15:46:11 2011] [error] [client 213.178.67.141] FastCGI: comm 
with (dynamic) server "/storage/60/2060/usr/local/wrappers/php5-fcgi" 
aborted: (first read) idle timeout (30 sec)
[Wed Jul 20 15:46:11 2011] [error] [client 213.178.67.141] FastCGI: 
incomplete headers (0 bytes) received from server 
"/storage/60/2060/usr/local/wrappers/php5-fcgi"
[Wed Jul 20 15:46:11 2011] [debug] mod_deflate.c(615): [client 
213.178.67.141] Zlib: Compressed 618 to 378 : URL 
/cgi-wrapper/php5-fcgi/index.php

suexec:
[2011-07-20 15:45:37]: uid: (2060/2060) gid: (2060/2060) cmd: php5-fcgi
[2011-07-20 15:45:42]: uid: (2060/2060) gid: (2060/2060) cmd: php5-fcgi
[2011-07-20 15:45:47]: uid: (2060/2060) gid: (2060/2060) cmd: php5-fcgi
[2011-07-20 15:45:52]: uid: (2060/2060) gid: (2060/2060) cmd: php5-fcgi

I tried to attached strace to the apache processes, but the output did 
not gave any hints to me for further debbugging.

So, does anyone know or please gives me some hints for further debugging?


Many thanks in advance.

Jan-Hendrik Palic