Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • @stormin303

    Participant

    I did not so long ago but wasn’t happy with the memory footprint I was having on my VPS mainly due to Apache being too resource hungry and the intermintent lock ups of my server because Apache likes memory for breakfast, especially when it gets busy and even when its not busy at times. Plus I had to tone down the static caching because I was doing a lot of development work on it and got fed up waiting for the new content to appear.

    Gone back to pure Nginx and certainly not looking back at the moment.

    Running Nginx, PHP-FastCGI, WP3 MS, BP and a whole heap of WP plugins and my site certainly has an edge over any other setup I’ve installed on it in the past, especially Memory/Speed wise.

    Biggest problem I have found with Nginx Rewrites is getting Images, avatars, avartar uploadds working. Nginx rewrites for WPMU 2.9.2 and WP3 MS are different (not sure about WP 2.9.2). Couldn’t find a working solution online so came up with my own based on the what I’ve learnt over the last few months. Probably better solutions as I’m not an expert but the important thing is that they work :).

    If you want to try yourself heres the Nginx rewrites I’m currenly using…

    location / {
    root /www//root;
    index index.php;

    gzip on;
    gzip_http_version 1.0;
    gzip_vary on;
    gzip_comp_level 3;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_buffers 16 8k;

    if (!-e $request_filename) {
    rewrite ^.+/?(/ms-.*) $1 last;
    rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1 last;
    rewrite ^.+/?(/wp-.*) $1 last;
    rewrite ^.+/?(/.*.php)$ $1 last;
    rewrite ^(.+)$ /index.php?q=$1 last;
    expires 10d;
    break;

    }
    }

    location ~* ^.+.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
    {
    root /www//root;
    rewrite ^/.*(/wp-.*/.*.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
    rewrite ^.*/files/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ /wp-includes/ms-files.php?file=$1 last;
    if (!-e $request_filename) {
    rewrite ^.+/?(/wp-.*) $1 last;
    rewrite ^.+/?(/.*.php)$ $1 last;
    rewrite ^(.+)$ /index.php?q=$1 last;
    }

    expires 30d;
    break;
    }

    location ~ .php$ {
    root /www//root;
    keepalive_timeout 0;

    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /www//root/$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_script_name;
    include fastcgi_params;
    }

    @stormin303

    Participant

    Here’s a question regarding the WP-Multi Network Plugin and WordPress 3-RC1

    Everything works swimmingly so far apart from one thing. When I try and signup up for a new blog on one of the networks it doesn’t redirect to the wp-signup.php file corectly. Works fine on the main site but not on the multi network sites I’ve setup.

    Guessing this can be fixed using .htaccess to redirect those requests so any tips on how to go about this would be fantastic.

    @stormin303

    Participant

    Whilst the user avatar uploads worked I discovered the Group Avatars didn’t and I was getting 404’s.

    However I managed to get around this by chaninging the WPMU Rewrites in Nginx to the code below.

    Similar issues with BP Album+ not showing images. I got it working by hacking the code before but since I’m on a run with Nginx at the mo I’ll have a look at the rewrite for that and BP Calendar.

    #


    WPMU rewrites


    #

    location ~* ^.+.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$

    {

    root /var/www/dinkypages.co.nz/public;

    rewrite ^/.*(/wp-.*/.*.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;

    rewrite ^.*/files/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ /wp-content/blogs.php?file=$1 last;

    rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;

    if (!-e $request_filename) {

    rewrite ^.+/?(/wp-.*) $1 last;

    rewrite ^.+/?(/.*\.php)$ $1 last;

    rewrite ^(.+)$ /index.php?q=$1 last;

    }

    expires 30d;

    break;

    }

    #


    WPMU rewrites


    #

    @stormin303

    Participant

    If anyone is interested, finally got it working…

    Changed the WPMU rewrites to

    #


    WPMU rewrites


    #

    location ~* ^.+.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$

    {

    root /var/www/mysite.com/public;

    rewrite ^/.*(/wp-.*/.*.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;

    rewrite ^.*/files/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ /wp-content/blogs.php?file=$1 last;

    expires 30d;

    break;

    }

    #


    WPMU rewrites


    #

    goodbye apache :)

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar