Hello,
i have installed Apache from ports and try since 2 days a config with fastcgi / php. But the Apache like not the PHP over CGI.
I have read something from in other forum which say all should use spawn-fcgi. So im not sure it's correct what i do, here my config:
Since 2 days i try all, but Apache say no. Before i has use a config with suPHP, but this make more Problems and now i must change the CMS, so need the new configuration.
Im happy when someone has idea.
Regards
Silvio
i have installed Apache from ports and try since 2 days a config with fastcgi / php. But the Apache like not the PHP over CGI.
I have read something from in other forum which say all should use spawn-fcgi. So im not sure it's correct what i do, here my config:
Code:
/usr/local/etc/rc.d/apache22/httpd.conf
LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so
Code:
/usr/local/etc/rc.d/apache22/extra/vhost.conf
ServerAdmin siefke@email.de
SuexecUserGroup silviosiefke silviosiefke
DocumentRoot "/usr/local/www/silvio_backup"
ServerName silviosiefke.de
ServerAlias www.silviosiefke.de
ErrorLog "/usr/local/www/silviosiefke/logs/error.log"
CustomLog "/usr/local/www/silviosiefke/logs/access.log" common
ScriptAlias /cgi-bin/ "/usr/local/www/silviosiefke/cgi-bin/"
AddHandler php5-fastcgi .php
FastCgiExternalServer /usr/local/www/silvio_backup -host 127.0.0.1:9000
<Directory "/usr/local/www/silvio_backup">
AllowOverride None
Options +ExecCGI MultiViews -Indexes
Order allow,deny
Allow from all
</Directory>
<Directory "/usr/local/www/silviosiefke/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Code:
# 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
Code:
# 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"
Code:
#Spawn-FCGI (/etc/rc.conf)
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"
Code:
/var/log/apache/httpd-error.log
[Wed Feb 02 13:32:35 2011] [notice] caught SIGTERM, shutting down
[Wed Feb 02 14:22:13 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/local/sbin/suexec)
[Wed Feb 02 14:22:14 2011] [notice] FastCGI: process manager initialized (pid 2388)
[Wed Feb 02 14:22:15 2011] [notice] Apache/2.2.17 (FreeBSD) mod_fastcgi/2.4.6 configured -- resuming normal operations
Code:
/var/log/apache/virtuellerserver.log
- - [02/Feb/2011:14:22:25 +0100] "GET /phpinfo.php HTTP/1.1" 200 17
Since 2 days i try all, but Apache say no. Before i has use a config with suPHP, but this make more Problems and now i must change the CMS, so need the new configuration.
Im happy when someone has idea.
Regards
Silvio