Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Aug 31, 2010 4:15 am 
Offline
Senior Newbie

Joined: Mon Aug 23, 2010 11:51 am
Posts: 7
Hi,

I really need your help. I just installed Nginx and php fast-cgi. the both are running. With ps aux | grep nginx and ps aux | grep cgi, I will be able to check if it's running. When I test to display a simple .html file in my wen repository, I don't have any problem but when I try to display some .php extension, it's not working (with simple .php file with phpinfo()).

The error I have in my log is:
connect() failed (110: Connection timed out) while connecting to upstream

I don't know where I missed something.

Regards,
Julien


Top
   
 Post subject:
PostPosted: Tue Aug 31, 2010 4:48 am 
Offline
Junior Member

Joined: Tue Jul 13, 2010 8:28 pm
Posts: 28
could you include the relevant configuration file and options for nginx/phpfastcgi?


Top
   
 Post subject:
PostPosted: Tue Aug 31, 2010 4:53 am 
Offline
Senior Newbie

Joined: Mon Aug 23, 2010 11:51 am
Posts: 7
Below my configuration file for nginx:
server {
listen 178.79.137.216:80;
server_name www.webdorado.fr;

access_log /home/webdorado/logs/access.log;
error_log /home/webdorado/logs/error.log;



location / {
root /home/webdorado/public_html/wordpress;
index index.html index.htm;
}

location ~ \.php$ {
#if (!-f $request_filename) {
# return 404;
#}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/webdorado/public_html/wordpress$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}

and for the configuration of fat-cgi, I followed the instruction describes on this page http://library.linode.com/web-servers/n ... 0.04-lucid.

#!/bin/sh
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 6 -u www-data -f /usr/bin/php5-cgi


Top
   
 Post subject:
PostPosted: Tue Aug 31, 2010 12:22 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Your configuration seems correct... though I don't get why the Linode Library article uses two shell scripts instead of a single init script for spawn-fcgi. It should work nonetheless.

What happens when you do ... ?
Code:
/etc/init.d/php-fastcgi stop
/etc/init.d/php-fastcgi start


Top
   
 Post subject:
PostPosted: Tue Aug 31, 2010 11:14 pm 
Offline
Senior Newbie

Joined: Mon Aug 23, 2010 11:51 am
Posts: 7
fastcgi is working, not problem. I founded a solution.

I replaced fastcgi_pass 127.0.0.1:9000; by fastcgi_pass unix:/tmp/fcgi.sock; and modify /usr/bin/php-fastcgi file. In Linode library, it's:
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 6 -u www-data -f /usr/bin/php5-cgi

I replaced too by:
/usr/bin/spawn-fcgi -s /tmp/fcgi.sock -C 6 -u www-data -g www-data -f /usr/bin/php5-cgi

I don't know I have to use a socket???. I will ask to Linode support. Very strange. If you have an idea, you're welcome :)


Top
   
 Post subject:
PostPosted: Wed Sep 01, 2010 4:31 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Do you have some sort of firewall running on your Linode? A misconfigured firewall might interfere with localhost traffic.


Top
   
 Post subject:
PostPosted: Wed Sep 01, 2010 10:50 pm 
Offline
Senior Newbie

Joined: Mon Aug 23, 2010 11:51 am
Posts: 7
Ah yes... I forgot to add this rules in my iptables. It's working now.

Thanks !
Julien


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group