httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Community <Commun...@MMHein.at>
Subject [users@httpd] Internal Server Error 500: apache + mod_fastcgi + php-fpm
Date Mon, 12 Jan 2015 11:33:46 GMT
Hi,

I’ve just setup apache, php, mysql/percona on my machos box using brew, all is fine so far,
server status, server info, phpinfo. Only when trying to install some php applications (drupal,
piwik, sugarcrm, phpmyadmin) some issues pop into existence.

In particular an “Internal Server Error 500”.

========================================
Having a peek into the log files reveals
========================================

------------------------
php-fpm
------------------------
[12-Jan-2015 11:27:54.173395] DEBUG: pid 24288, fpm_pctl_perform_idle_server_maintenance(),
line 379: [pool www] currently 1 active children, 4 spare children, 5 running children. Spawning
rate 1
[12-Jan-2015 11:27:54.309316] DEBUG: pid 24288, fpm_got_signal(), line 76: received SIGCHLD
[12-Jan-2015 11:27:54.309400] WARNING: pid 24288, fpm_children_bury(), line 252: [pool www]
child 24374 exited on signal 11 (SIGSEGV) after 174.270200 seconds from start
[12-Jan-2015 11:27:54.310113] NOTICE: pid 24288, fpm_children_make(), line 421: [pool www]
child 24510 started
[12-Jan-2015 11:27:54.310320] DEBUG: pid 24288, fpm_event_loop(), line 419: event module triggered
1 events
[12-Jan-2015 11:27:55.174534] DEBUG: pid 24288, fpm_pctl_perform_idle_server_maintenance(),
line 379: [pool www] currently 0 active children, 5 spare children, 5 running children. Spawning
rate 1

------------------------
apache
------------------------
[Mon Jan 12 11:27:54.309409 2015] [fastcgi:error] [pid 24302:tid 4556296192] [client 192.168.191.150:56595]
FastCGI: incomplete headers (0 bytes) received from server "/var/run/php-fpm/www-php-fpm.fcgi",
referer: http://dev.myhost.local/install.php


========================================
My setup
========================================

+-----------------------------------------------------------+
| MacOS X 10.10 "Yosemite"                                  |
| +--------+ +-------------+ +---------+ +----------------+ |
| | Apache | | mod_fastcgi | | php-fpm | | percona-server | |
| | 2.4.10 | | 2.4.6       | | 5.6.3   | | 5.6.21-70.1    | |
| +--------+ +-------------+ +---------+ +----------------+ |
+-----------------------------------------------------------+

------------------------
php-fpm
------------------------

;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

include=/usr/local/etc/php/5.6/php-fpm.d/*.conf

;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;

[global]
pid = /var/run/php-fpm/php-fpm.pid
error_log = /var/log/php-fpm/php-fpm.error.log
log_level = error
events.mechanism = kqueue

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ; 
;;;;;;;;;;;;;;;;;;;;

[www]
user = _www
group = _www
listen = /var/run/php-fpm/www-php-fpm.sock
listen.mode = 0666
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 5
pm.status_path = /phpfpm-status
ping.path = /phpfpm-ping
ping.response = phpfpm-pong
access.log = /var/log/php-fpm/$pool.access.log
;chroot = /data/www
;chdir = /data/www
security.limit_extensions = .php .php3 .php4 .php5
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f webmaster@myhost.local
php_admin_value[error_log] = /var/log/php-fpm/$pool.error.log
php_admin_value[memory_limit] = 512M


------------------------
apache
------------------------

;;;;;;;;;;;;;;;;;;;;;;;;;
; FastCGI Configuration ;
;;;;;;;;;;;;;;;;;;;;;;;;;
<IfModule mod_fastcgi.c>
	AddHandler				fastcgi-script				.fcgi
	FastCgiIpcDir			/var/run/apache2/fastcgi
</IfModule>

;;;;;;;;;;;;;;;;;;;;;;;;;
; PHP-FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;;;;;
<IfModule mod_fastcgi.c>

	<FilesMatch "^/phpfpm-(status|ping)$">
		SetHandler									php-script
	</FilesMatch>

	<IfModule mod_alias.c>
		Alias				/php-info				/data/www/tools/phpinfo.php
	</IfModule>
	<FilesMatch "^/phpfpm-info$">
		SetHandler									php-script
	</FilesMatch>

	# Enable FastCGI site-wide
	AddType					application/x-httpd-php	.php
	Action					application/x-httpd-php	/php.fastcgi
	Action					php-script				/php.fastcgi

	<IfModule mod_alias.c>
		Alias				/php.fastcgi			/var/run/php-fpm/www-php-fpm.fcgi
	</IfModule>

	#FastCGIExternalServer							/var/run/php-fpm/www-php-fpm.fcgi -socket /var/run/php-fpm/www-php-fpm.sock
-flush
	FastCGIExternalServer							/var/run/php-fpm/www-php-fpm.fcgi -socket /var/run/php-fpm/www-php-fpm.sock
	#FastCGIExternalServer							/var/run/php-fpm/www-php-fpm.fcgi -host 127.0.0.1:9000
	  
	<Directory "/data/www/fastcgi">
		Order										allow,deny

		<Files "php.fastcgi">
			Order									deny,allow
		</Files>
	</Directory>

</IfModule>

;;;;;;;;;;;;;;;;;;;;;;;;;
; vhost Configuration   ;
;;;;;;;;;;;;;;;;;;;;;;;;;
<VirtualHost dev.myhost.local:80>
	ServerName dev.myhost.local:80
	ServerAdmin Webmaster@MMHein.at

	DocumentRoot	"/data/www/sites/dev.myhost.local/apps/drupal"
	<Directory />
		Options FollowSymLinks
		
		#AllowOverride None
		#AllowOverride FileInfo Limit Options
		# Options instead of None in order for rewrite to work!!
		AllowOverride All

	</Directory>
	<Directory "/data/www/sites/dev.myhost.local/apps/drupal">
		Options Indexes FollowSymLinks MultiViews
		
		#AllowOverride None
		#AllowOverride FileInfo Limit Options
		# Options instead of None in order for rewrite to work!!
		AllowOverride All

		Order allow,deny
		Allow from all
	</Directory>

	<IfModule mod_alias.c>
		ScriptAlias /cgi-bin/	"/data/www/sites/dev.myhost.local/cgi-bin/"
		<Directory "/data/www/sites/dev.myhost.local/cgi-bin">
			AllowOverride None
			Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
			Order allow,deny
			Allow from all
		</Directory>
	</IfModule>

	ErrorLog /var/log/apache2/dev.myhost.local.error.log
	LogLevel error
	CustomLog /var/log/apache2/dev.myhost.local.access.log combined

</VirtualHost>


Any ideas as how to tackle this one?

— Sil68
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message