LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   apache with php/suexec/fpm/fastcgi? (http://www.linuxquestions.org/questions/linux-server-73/apache-with-php-suexec-fpm-fastcgi-821630/)

hoodez 07-23-2010 01:26 AM

apache with php/suexec/fpm/fastcgi?
 
I've got apache compiled as follows:

Code:

./configure --prefix=/usr/local/apache --disable-autoindex
 --disable-cgi --disable-cgid --disable-env --disable-imap
--disable-setenvif --enable-cache=shared --enable-deflate=shared
--enable-file-cache=shared --enable-disk-cache=shared 
--enable-mem-cache=shared --enable-proxy=shared --enable-rewrite
--enable-so --enable-ssl --with-mpm=prefork --enable-suexec 
--with-suexec-bin=/usr/sbin/suexec --with-suexec-caller=apache 
--with-suexec-userdir=public_html --with-suexec-docroot=/home

Code:

cat /usr/local/apache/conf/extra/mod_fastcgi.conf
<IfModule mod_fastcgi.c>
FastCgiSuExec /usr/local/apache/bin/suexec
FastCgiIpcDir /tmp/fcgi_ipc/
FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -idle-timeout 240 -maxClassProcesses 5 -maxProcesses 20 -pass-header HTTP_AUTHORIZATION
AddHandler fastcgi-script .fcgi .php
Action fastcgi-script "/php5.fcgi"
Action application/x-httpd-php5 "/php5.fcgi"
AddType application/x-httpd-php5 .php5
</IfModule>
<IfModule !mod_fastcgi.c>
AddHandler fastcgi-script .fcgi .php
Action fastcgi-script "/php5.fcgi"
Action application/x-httpd-php5 "/php5.fcgi"
AddType application/x-httpd-php5 .php5
</IfModule>

PHP:
Code:

./configure --enable-gd-native-ttf --enable-magic-quotes --prefix=/usr/local --with-config-file-path=/usr/local/lib --enable-suhosin --with-curl=/opt/curlssl/ --with-curlwrappers --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-png-dir=/usr --with-ttf --enable-fastcgi --enable-discard-path --enable-force-cgi-redirect --enable-fpm --with-fpm-pid=/var/run/php-fpm.pid --with-fpm-log=/var/log/php-fpm.log --with-fpm-conf=/usr/local/apache/conf/php-fpm.conf --with-fpm-init=/etc/rc.d/rc.php-fpm --enable-pcntl --enable-sigchild
(don't think the fpm patch installed but thats 2ndary)

Code:

cat /usr/local/apache/conf/extra/httpd-userdir.conf
UserDir public_html
<Directory "/home/*/public_html">
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews -Indexes SymLinksIfOwnerMatch +ExecCGI
    DirectoryIndex index.php index.html
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

Code:

cat /usr/local/apache/conf/extra/httpd-vhosts.conf
NameVirtualHost *:81
<VirtualHost *:81>
    ServerAdmin webmaster@mysize.com
    DocumentRoot "/home/www/public_html"
    ServerName mysize.com
    ServerAlias www.mysize.com
    ErrorLog "logs/mysize.com-error_log"
    CustomLog "logs/mysize.com-access_log" common
<Directory "/home/www/public_html">
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews -Indexes SymLinksIfOwnerMatch +ExecCGI
</Directory>
</VirtualHost>

but i can't get the php pages to load...

what im trying to do is compile php so it executes as its own user. im used to doing this from cpanel....

only errors i can find are:
Code:

[Fri Jul 23 07:22:50 2010] [error] [client 176.23.29.21] FastCGI: comm with (dynamic) server "/home/www/public_html/phpinfo.php" aborted: (first read) idle timeout (240 sec)
[Fri Jul 23 07:22:50 2010] [error] [client 176.23.29.21] FastCGI: incomplete headers (0 bytes) received from server "/home/wwww/public_html/phpinfo.php"



All times are GMT -5. The time now is 02:38 AM.