Suexec and fastcgi

1 post / 0 new
#1 Wed, 01/09/2008 - 01:32
RedKnot

Suexec and fastcgi

Hi, I'm trying to configure a webserver using virtualmin with suexec and fastcgi. I used the following setting s and get the error as seen in error_log. Any ideas?

in httpd.conf: LoadModule fastcgi_module libexec/mod_fastcgi.so LoadModule suexec_module libexec/mod_suexec.so

in extra/httpd-fastcgi.conf <IfModule mod_fastcgi.c> FastCgiIpcDir /opt/csw/apache2/share/htdocs/suexec/tmp AddHandler fastcgi-script .fcgi FastCgiSuexec On FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240 -pass-header HTTP_AUTHORIZATION </IfModule>

<Location /php-fastcgi/> Options +ExecCGI SetHandler fastcgi-script </Location>

the vhost file (the real ip is replaced with *****) <VirtualHost **********:80> ServerName testserver

DocumentRoot /home/testserver/public_html

ErrorLog /home/testserver/logs/error_log CustomLog /home/testserver/logs/access_log "combined"

DirectoryIndex index.html index.php

SuexecUserGroup testserver testserver

<Directory /home/testserver/public_html> Allow from All </Directory>

ScriptAlias /php-fastcgi/ /opt/csw/apache2/share/htdocs/suexec/testserver/

AddType application/x-httpd-fastphp .php Action application/x-httpd-fastphp /php-fastcgi/php5-cgi

<Directory /opt/csw/apache2/share/htdocs/suexec/testserver> Allow from all </Directory> LogLevel emerg </VirtualHost>

Apache is configured this way: Server version: Apache/2.2.6 (Unix) Server built: Oct 23 2007 16:48:02 Server's Module Magic Number: 20051115:5 Server loaded: APR 1.2.11, APR-Util 1.2.10 Compiled using: APR 1.2.11, APR-Util 1.2.10 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/opt/csw/apache2" -D SUEXEC_BIN="/opt/csw/apache2/sbin/suexec" -D DEFAULT_PIDLOG="/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="/var/run/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="etc/mime.types" -D SERVER_CONFIG_FILE="etc/httpd.conf"

The php5-cgi file:

!/bin/sh

PHPRC="/opt/csw/php5/lib" export PHPRC PHP_FCGI_CHILDREN=8 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=500 export PHP_FCGI_MAX_REQUESTS exec /opt/csw/php5/bin/php-cgi \ -d open_basedir=/home/testserver:/opt/csw/php5/lib:/opt/******/share/htdocs \ -d session.save_path=/home/testserver/tmp \ -d upload_tmp_dir=/home/testserver/tmp

I tried chmod the files so everbody can read them etc but nothing works. [Wed Jan 09 11:26:55 2008] [notice] suEXEC mechanism enabled (wrapper: /opt/csw/apache2/sbin/suexec) [Wed Jan 09 11:26:56 2008] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads. [Wed Jan 09 11:26:56 2008] [notice] mod_python: using mutex_directory /tmp [Wed Jan 09 11:26:56 2008] [notice] FastCGI: wrapper mechanism enabled (wrapper: /opt/csw/apache2/sbin/suexec) [Wed Jan 09 11:26:56 2008] [notice] FastCGI: process manager initialized (pid 28368) [Wed Jan 09 11:26:56 2008] [notice] Digest: generating secret for digest authentication ... [Wed Jan 09 11:26:56 2008] [notice] Digest: done [Wed Jan 09 11:26:56 2008] [notice] Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g mod_fastcgi/2.4.2 DAV/2 SVN/1.4.5 mod_python/3.3.1 Python/2.5.1 configured -- resuming normal operations [Wed Jan 09 11:27:14 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/testserver/php5-cgi" (uid 10003, gid 10003) started (pid 28379) FastCGI: can't start server "/opt/csw/apache2/share/htdocs/suexec/testserver/php5-cgi" (pid 28379), execle() failed: Permission denied [Wed Jan 09 11:27:14 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/testserver/php5-cgi" (pid 28379) terminated by calling exit with status '255' [Wed Jan 09 11:27:21 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/testserver/php5-cgi" (uid 10003, gid 10003) restarted (pid 28381) FastCGI: can't start server "/opt/csw/apache2/share/htdocs/suexec/testserver/php5-cgi" (pid 28381), execle() failed: Permission denied [Wed Jan 09 11:27:21 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/testserver/php5-cgi" (pid 28381) terminated by calling exit with status '255'

Thanks, Martijn