Forum

FastCGI

René
3 March 2012, 03:35


Hiawatha version: 7.8.2
Operating System: FreeBSD 9.0-RELEASE amd64

Hi Hugo,

The last few days I am scratching my head because I can't get FastCGI on my virtual private server to work. I have a few hosts with Hiawatha that work but those are installed last week. Something has changed?
Hugo Leisink
3 March 2012, 07:33
Well, I didn't change anything on your VPS . And to help you with this, I need more information other than "it doesn't work".
René
3 March 2012, 08:19
I am using this setup for FastCGI
FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:2005
Extension = php
SessionTimeout = 30
}

VirtualHost {
...
TimeForCGI = 5
UseFastCGI = PHP5
ExecuteCGI = yes
TriggerOnCGIstatus = no
}

Server = /usr/local/bin/php-cgi ; 127.0.0.1:2005 ; www-data ; /usr/local/etc/php.ini

The problem is that I can't find any problems in my logs. The hosts with Hiawatha compiled before 25 Februari do work without errors and use FastCGI. Hosts that have Hiawatha compiled after the 25th of Februari don't work with FastCGI. Now I see the old welcome page which wasn't the case before the 25th of Februari. So that's why I asked.
Hugo Leisink
3 March 2012, 08:52
Hosts that have Hiawatha compiled...

Hosts compiled Hiawatha?? I don't understand this...

The only thing happend at februrary 25th is a new Hiawatha release; 8.1. But since you are still using 7.8.2, that has nothing to do with it.

I don't think that seeing the welcome page instead of the expected website has something to do with FastCGI. Is normal CGI working? (just remove the 'UseFastCGI = PHP5' line to check it)
René
3 March 2012, 09:06
Yes, it does work without UseFastCGI
Hugo Leisink
3 March 2012, 09:10
And you're sure you're still using 7.8.2 and not 8.1? The only thing 'happened' on february 25th is the release of 8.1, in which nothing has changed that could affect the handling of FastCGI daemons...
René
3 March 2012, 09:23
I didn't say you did something wrong, because you are doing a great job for those who enjoy using Hiawatha. What I don't understand is that I use the same setup (from a very solid host with a compiled version of Hiawatha) with my new vps and it doesn't work.
Hugo Leisink
3 March 2012, 09:35
And what do you mean with 'the old welcome page'?
René
3 March 2012, 09:38
The one before your 10TH ANNIVERSARY...
Hugo Leisink
3 March 2012, 09:54
You mean the 'CONGRATULATIONS The Hiawatha webserver has successfully been installed on this computer..." page?
René
3 March 2012, 09:57
Your "10th Anniversary Edition V7.8.2" works flawless with all the bells and whistels.
Hugo Leisink
3 March 2012, 10:17
I don't think this is a Hiawatha issue, but an issue with your new VPS. Since I have no idea what goes on on your VPS, I really have no idea what might be the cause of the problem...
René
3 March 2012, 10:30
Look everything works with UseFastCGI = no but when I enable UseFastCGI I get a 503 Service Unavailable and this doesn't happen with a compiled version of Hiawatha before the 25th of Februari. This is what strikes me.
Hugo Leisink
3 March 2012, 11:20
The 503 is new information....
The problem is that Hiawatha can't connect to the FastCGI daemon. Is it running? If so, try connecting to it via a 'telnet localhost 2005'.
René
3 March 2012, 11:35
hiawatha# telnet localhost 2005
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Operation not permitted


USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
root sshd 86855 3 tcp4 10.1.1.3:22 *:*
www-data hiawatha 86842 3 tcp4 10.1.1.3:80 *:*
www-data php-cgi 86838 3 tcp4 10.1.1.3:2005 *:*
www-data php-cgi 86837 3 tcp4 10.1.1.3:2005 *:*
www-data php-cgi 86836 3 tcp4 10.1.1.3:2005 *:*
www-data php-cgi 86835 3 tcp4 10.1.1.3:2005 *:*



I also have reinstalled PHP 5.3.10
Hugo Leisink
3 March 2012, 14:03
Looks like php-cgi is somehow binded via 10.1.1.3 instead of 127.0.0.1. Try that IP-address instead.
René
3 March 2012, 14:41
It's the same 503 error Hugo
Hugo Leisink
3 March 2012, 14:43
For some reason, access to your PHP FastCGI daemon is denied. I have no idea why. This is not a Hiawatha issue, but some issue on your machine. The operation-not-permitted shows this.

I'm afraid I can't help you with that, because I can't look around on your VPS to see what's going on. Perhaps a firewall issue?? Try turning it off.
René
3 March 2012, 15:02
I am glad you've helped me this far, Hugo. For the last 4 days I am trying to solve this problem. Firewall on and off, new jails, reinstalls, different setups etc... Luckily I have two working hosts to my advantage. I will let you know if I have succeeded or not. I don't give up that easily.

Thanks again!
René
3 March 2012, 15:48
Got it! Listening to your advice I took the liberty to remove some of the Laurel and Hardy from my pf configuration file ( block log (all)...does that ring a bell somewhere? ) and now its working... PHEW
Hugo Leisink
3 March 2012, 16:34
That's good to hear!
This topic has been closed.