Multiple wordpress installs on same ip

I’m having some difficulty with a wordpress behavior that I have not
been able to figure out.

When I try to split off the second install I get into a wordpress issue
where it sends me to the signup page instead of allowing nginx to direct
the url to the appropriate folder.

Here’s the relevant lines from my conf file.

server {
listen 80;
server_name mydomain.com;
root /home/mydomain/public_html;
index index.php;
fastcgi_read_timeout 600;

    location / {
       try_files      $uri $uri/ @Wordpress;
    }

    location @Wordpress {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME

/home/mydomain/public_html/index.php;
include fastcgi_params;
fastcgi_param SCRIPT_NAME /index.php;
}

    location ~ \.php$ {
        try_files      $uri @Wordpress;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME

/home/mydomain/public_html$fastcgi_script_name;
include fastcgi_params;
}
}

server {
listen 80 default;
server_name ~^(www.)?(?P.+)$;
root /home/domain2/public_html;
index index.php;
fastcgi_read_timeout 1200;
fastcgi_connect_timeout 1200;
fastcgi_send_timeout 1200;

    location / {
        set         $memcached_key  $host$uri;
        memcached_pass  127.0.0.1:11211;
        default_type    text/html;
        error_page      404 502 = @dynamicContent;
    }

    location  @dynamicContent {
        try_files      $uri $uri/ @wordpress;
    }

    location @wordpress {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME

/home/domain2/public_html/index.php;
include fastcgi_params;
fastcgi_param SCRIPT_NAME /index.php;
}

    location ~ \.php$ {
        try_files      $uri @wordpress;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME

/home/domain2/public_html$fastcgi_script_name;
include fastcgi_params;
}
}

the problem is that my catchall is not being allowed to catch because of
the wordpress behavior. Anybody have a work around?

Thanks

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,120888,120888#msg-120888

sorry, this looks like a mess.

http://michaelshadle.com/2009/03/19/finally-using-nginxs-try-files-directive/

use that.

then throw in the memcache stuff if you need it

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs