php and suexec on debian

From: Clement Hermann (clement.hermann_at_eolas.fr)
Date: 07/31/03

  • Next message: Ron Johnson: "Re: Linux firewall vs Windows and Hardware based firewalls"
    Date: Thu, 31 Jul 2003 14:03:46 +0200
    To: debian-user@lists.debian.org
    
    

    Hi,

    I'm trying tu use php in cgi mode with suexec.

    I had no problem with this setup previously, as I used to compile apache
    myself, so I could specify whichever path I want for docroot and userdir.

    I used to specify --suexec-userdir=cgi-bin, and to put a php binary in a
    $HOME/cgi-bin directory for each user, and each virtualhost had the
    following configuration:

    user foo
    group foo
    DocumentRoot <home>/www
    Servername blabla
    errorlog blabla
    customlog blabla combined
    AddType application/my-x-httpd-php .php
    Action application/my-x-httpd-php /cgi-php/php
    ScriptAlias /cgi-php <home>/cgi-bin

    I took a quick look on the debian/rule file of the apache source
    package, and saw that userdir was "public-html". docroot was /var/www,
    but as I intended to use the userdir, I did not bother.

    So, I replaced cgi-bin by public_html, but the suexec log keeps telling
    me that php is outside the docroot. But when I use the userdir, I don't
    rely upon the docroot, Or do I ?

    I Also tried to specify a directory inside the docroot (say,
    /var/www/foo_cgi-bin), but the I have no error with suexec, but php
    return a parse error on the binary (!).

    I'd really appreciate if someone with a little experience with suexec on
    debian could tell me what I messed up.

    Best regards,

    PS: Sorry for debian-user-french readers who might have seen this mail
    in french before... ;)

    -- 
    Clément Hermann --------------------|----------------------|
    Administrateur systèmes et réseaux  | +33 (0)4-76-44-50-50 |
    Business & Decision.Eolas           | http://www.eolas.fr  |
    ------------------------------------|----------------------|
    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Ron Johnson: "Re: Linux firewall vs Windows and Hardware based firewalls"

    Relevant Pages

    • Re: php and suexec on debian
      ... > I'm trying tu use php in cgi mode with suexec. ... so I could specify whichever path I want for docroot and userdir. ... > Servername blabla ...
      (Debian-User)
    • php stub
      ... I am in love with Suexec. ... secure (i.e. by not running scripts in 777 directories, ... So then I looked at suexec with php, which pretty much breaks embedded php ... This would be similar to the way safe mode presently operates (as in, ...
      (php.general)
    • Re: phpBB Worm
      ... perl script on Unix as well as on Windows other than the first line ... suexec mechanism in order to run each customer within his own user's space. ... The downside of using suexec is that PHP as a CGI doesn't offer a small ...
      (Bugtraq)
    • Suexec/SafeMode Hybrid [repost]
      ... I am in love with Suexec. ... secure (i.e. by not running scripts in 777 directories, ... So then I looked at suexec with php, which pretty much breaks embedded php ... This would be similar to the way safe mode presently operates (as in, ...
      (php.general)
    • Re: Secured hosting on a shared server--impossible?
      ... After struggling for months with suexec, ... > the suPHP module (which acts as a wrapper, ... that won't be readable even in case Apache gets ... > suPHP uses the CGI php binary. ...
      (comp.lang.php)