nginx + wordpress rewrite question

Jaime Magiera jaime at sensoryresearch.net
Tue Feb 16 15:28:37 MSK 2010


OK, I appreciate all your help. It seems I've messed things up even more now. While attempting to translate what you folks provided, I've now got a configuration that doesn't work right even with standard wordpress links. If I try to go to the default URL for the blog, I end up getting a download of the php instead of the page displaying (however, some other wordpress URLS work?). I'm really not getting nginx. Can someone perhaps point out what it is that I'm not getting. Taking this project over cold with no nginx experience is becoming a very frustrating experience.

/////////////////////////

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    passenger_root /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/passenger-2.2.2;
    passenger_ruby /opt/ruby-enterprise-1.8.6-20090610/bin/ruby;
    passenger_default_user playsay;
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    gzip  on;

    client_max_body_size 512m;
    server {
        listen 80;
        server_name www.playsay.com;
        root /home/playsay/apps/playsay/current/public;
        access_log /home/playsay/logs/access.log;
        error_log /home/playsay/logs/error.log;
        passenger_enabled on;
        location /files {
            root /home/playsay;
            internal;
        }

        index           index.php index.html;
        location ~ \.php$ {
                fastcgi_index  index.php;
                fastcgi_pass   localhost:9000;
                fastcgi_param  SCRIPT_FILENAME
                       $document_root$fastcgi_script_name;
                include        /opt/nginx/conf/fastcgi_params;
        }

        location /blog {
                passenger_enabled off;
                index index.html index.htm index.php;
                try_files $uri $uri/ @blog;
        }

        location @blog {
                include        /opt/nginx/conf/fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root/blog/index.php;
                fastcgi_param QUERY_STRING q=$uri&$args;
        }

...
 }
}


Jaime Magiera

Sensory Research, Inc.
http://www.sensoryresearch.net










More information about the nginx mailing list