SuExec compiling

Discussion in 'Server Operation' started by qtam0, Sep 13, 2006.

  1. qtam0

    qtam0 New Member


    I have a homeserver, which has apache 2.0.54 as webserver. I've installed fastcgi and compiled php5 to run as FastCGI.

    I've tried to get fastcgi use suexec wrapper mechanism. It does work, but only on my primary web-address (
    My vhosts are set so that /www/ is docroot for the primary address, and /www/ is for vhost1 /www/ for vhost2 etc.

    Because I want FastCGI to use suexec, I used this howto:
    and complied php and suexec (I didn't edit suexec.c, because I want suexec to check file owner).

    But there's a problem on suexec compile, when I do "./suexec -V" after "make suexec" it says:

    even if I modified suexec.h like:

    replaced with
    #define AP_DOC_ROOT "/www"

    before "make suexec". I even tried to edit ap_config_layout.h so that #define DEFAULT_EXP_HTDOCSDIR "/www"
    #define DEFAULT_EXP_HTDOCSDIR "/www"
    but it didn't help. After make it still says "-D AP_DOC_ROOT="/var/www""

    The reason why my primary domain works is (or I think it is...) that I have symlinked /var/www to /www/ like this:
    Does anyone know why settings from suexec.h won't apply?

    ps. sorry about my bad english, I tried to make it understandable :)
    Last edited: Sep 13, 2006
  2. falko

    falko Super Moderator ISPConfig Developer

    suExec doesn't accept symlinks for security reasons.
    Usually you'd specify the suExec docroot when you compile Apache (in the Apache configure statement).
  3. qtam0

    qtam0 New Member

    Well I in fact solved the problem by making /var/www symlink to /www and now SuExec works fine... (not the finest way, I know.)

    I didn't want to compile apache, as I have installed it by the-easy-way, apt-get :)

    Now there is only one problem, php scripts work only on my userdir (public_html), and on other users it says "No input file specified.". So now set so apache's mod php will handle .php files (works fine on everywhere), but if I use .htaccess file like this to get php use FastCGI-SuExeced-php (what a word..):

    This works on public_html, I don't know the right path for vhosts (as "/www/" and "/php5.fcgi" didn't work) so this doesn't work on vhosts...
  4. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    locate php5.fcgi
  5. qtam0

    qtam0 New Member

    server:/www# updatedb
    server:/www# locate php5.fcgi
    /home/me/public_html/php5.fcgi (works fine...)
    /home/user/public_html/php5.fcgi (if handler php5.fcgi is in use, "No input file specified." message appears)
    /www/ (uses Apache 2.0 Handler, changing handler to php5.fcgi in .htaccess doesn't effect)
    /www/ (uses Apache 2.0 Handler, changing handler to php5.fcgi in .htaccess doesn't effect)
    .htaccess in all directories listed above is
    RemoveHandler .php
    AddType application/fastcgi-php php
    Action application/fastcgi-php "/php5.fcgi"
    and all directories listed above include the php5.fcgi file..
    exec /usr/bin/php
    Last edited: Sep 19, 2006
  6. falko

    falko Super Moderator ISPConfig Developer

    Are /www/ and /www/ the document root of your web sites?
  7. qtam0

    qtam0 New Member

Share This Page