Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Wordpress site running on Apache that is heavily overloaded, so I want to try replacing it with nginx/fastcgi to see if it would help.

I compiled spawn-fcgi and nginx configured a server that would run on port 81 as a test. When I try accessing the site, it says "Waiting for site" and never loads (and the access logs does not show anything)

I started spawn-cgi like so:

/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 53217 -P /var/run/fastcgi-php.pid -- /usr/bin/php-cgi

and here's my nginx config:

http {
    include   /etc/nginx/mime.types;
    default_type  application/octet-stream;

    #keepalive_timeout  0;
    keepalive_timeout  65;


    server {
      listen     xxx.xxx.xxx.xxx:81;               
      server_name  domain.com www.domain.com;               
      access_log  /home/domain.com/nginx.access.log;
      root        /home/domain/public_html/;  # absolute path to WordPress installation

      try_files $uri $uri/ /index.php;

      location ~ \.php$ {
        include        fastcgi_params;
        fastcgi_pass   127.0.0.1:53217;

        fastcgi_index   index.php;
        fastcgi_param   SCRIPT_FILENAME /home/domain/public_html$fastcgi_script_name;

      }

   }


}


events {
    worker_connections  1024;
}

and finally, here is my fastcgi_params file:

fastcgi_param  QUERY_STRING   $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE   $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI   $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

Is there anything in my config that would stop me from serving a basic WP site? I'm running this on CentOS on a dedicated box.

share|improve this question
    
Is your port 81 firewalled, by any chance? –  Vladimir Blaskov Aug 14 '11 at 18:49
    
Not the question you asked - but why not Apache + mod_fcgid so your Apache processes are smaller? –  EightBitTony Aug 14 '11 at 19:53
    
@vladmir: firewall rules are fine. I even stopped iptables and checked.. it's the same –  Jahufar Aug 15 '11 at 0:44
    
@EightbitTony: Currently using mod_fcgid... –  Jahufar Aug 15 '11 at 0:48

1 Answer 1

Technically not an answer - but how about running a network trace (tcpdump / wireshark) on the server and/or client and see what it's trying to do?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.