Hiawatha + PHP + FastCGI

Hi,

Can anyone help me how to set up www/hiawatha web-server with lang/php5 and FastCGI?

I have tried changing my hiawatha.conf like this but no success:
Code:
Hostname = 127.0.0.1
WebsiteRoot = /usr/local/www/hiawatha
StartFile = index.php
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi

and /usr/local/etc/hiawatha/php-fcgi.conf
Code:
PidFile = /var/run/php-fcgi.pid
MaxRequests = 100
Server = /usr/local/bin/php-cgi ; 4 ; /var/lib/hiawatha/php-fcgi.sock ; www:www ; /usr/local/etc/php.ini

My browser downloads the index.php instead of displaying it when I try to access my domain.
 
Hi,

There is (should be) a section in hiawatha.conf named FastCGIserver. Could you please post what's in there ?
 
This is my FastCGIServer settings


Code:
FastCGIserver {
       FastCGIid = PHP5
       ConnectTo = /var/lib/hiawatha/php-fcgi.sock
       Extension = php
       SessionTimeout = 30
}
 
Hi,

# head -3 /usr/local/etc/hiawatha/php-fcgi.conf.sample
Code:
# PHP FastCGI configuration

# !! Warning, this tool is deprecated. Use php-fpm instead.

Just use php-fpm instead. Take a good look at php-fcgi.sock. The php-fcgi.sock location in /usr/local/etc/hiawatha/hiawatha.conf should match the one in /usr/local/etc/php-fpm.conf.

Don't forget to enable php-fpm in rc.conf and start it.

# echo "php_fpm_enable="YES"" >> /etc/rc.conf
# /usr/local/etc/rc.d/php-fpm start
 
Back
Top