Hello,

i try since 2 days to run Apache with FastCGI and PHP. I have try other
configuration, FCGI with PHP, the same. The apache want not use PHP over
CGI.

Before i use a configuration with suPHP and PHP-CGI without any
Problems. Only that this like not some CMS which want try. So i must
change the configuration.


My System:
# uname -a
FreeBSD hetzner.silviosiefke.de 8.1-STABLE FreeBSD 8.1-STABLE #0: Thu
Sep 16 22:54:11 CEST 2010
r...@hetzner.silviosiefke.de:/usr/obj/usr/src/sys/GENERIC  i386

In the httpd.conf i have activate the line
LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so

and in the virutell Host i take the follow lines, i has read that
spawn-cgi the better configuration as shell scripts:

AddHandler php5-fastcgi .php
FastCgiExternalServer /usr/local/www/silvio_backup -host 127.0.0.1:9000

That was the configuration, more i have not do.

Spawn-fcgi i startet with the commands:
# cat /etc/rc.conf | grep spawn
spawn_fcgi_enable="YES"
spawn_fcgi_app="/usr/local/bin/php-cgi"
spawn_fcgi_pidfile="/var/run/spawn-fcgi.pid"
spawn_fcgi_username="www"
spawn_fcgi_groupname="www"
spawn_fcgi_bindaddr="127.0.0.1"
spawn_fcgi_bindport="9000"
#spawn_fcgi_bindsocket="/tmp/php.socket"
#spawn_fcgi_bindsocket_mode="0777"
spawn_fcgi_children="5"
spawn_fcgi_max_requests="1000"

In the log i have no entry only one line,
- - [02/Feb/2011:14:37:09 +0100] "GET /phpinfo.php HTTP/1.1" 200 17

# httpd -M
Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 authn_file_module (shared)
 authn_default_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_user_module (shared)
 auth_basic_module (shared)
 file_cache_module (shared)
 cache_module (shared)
 disk_cache_module (shared)
 reqtimeout_module (shared)
 charset_lite_module (shared)
 deflate_module (shared)
 log_config_module (shared)
 env_module (shared)
 mime_magic_module (shared)
 cern_meta_module (shared)
 unique_id_module (shared)
 setenvif_module (shared)
 mime_module (shared)
 status_module (shared)
 autoindex_module (shared)
 asis_module (shared)
 suexec_module (shared)
 cgid_module (shared)
 cgi_module (shared)
 negotiation_module (shared)
 dir_module (shared)
 actions_module (shared)
 alias_module (shared)
 rewrite_module (shared)
 fastcgi_module (shared)
Syntax OK

# httpd -V
Server version: Apache/2.2.17 (FreeBSD)
Server built:   Feb  2 2011 12:53:55
Server's Module Magic Number: 20051115:25
Server loaded:  APR 1.4.2, APR-Util 1.3.10
Compiled using: APR 1.4.2, APR-Util 1.3.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_FLOCK_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="/usr/local"
 -D SUEXEC_BIN="/usr/local/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/apache22/mime.types"
 -D SERVER_CONFIG_FILE="etc/apache22/httpd.conf"

# ps ax | grep php
 2343  ??  Is     0:00.05 /usr/local/bin/php-cgi
 2344  ??  I      0:00.01 /usr/local/bin/php-cgi
 2345  ??  I      0:00.00 /usr/local/bin/php-cgi
 2346  ??  I      0:00.00 /usr/local/bin/php-cgi
 2347  ??  I      0:00.00 /usr/local/bin/php-cgi
 2348  ??  I      0:00.00 /usr/local/bin/php-cgi


I really know not what i should do, i not find the mistake or the bad
configuration. Apache not use log really. Has someone a idea what going
wrong.


Regards
Silvio

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to