Forum Replies Created

Viewing 1 replies (of 1 total)
  • The reason you’re having issues is because Apache rewrites and other directives used by W3TC do not apply in Nginx. Therefore, you will have to manually edit the Nginx vhost.

    For WordPress, you’re going to want to use the following in server {}:

    if ($host ~* ^www\.(.*)) {
        set $host_without_www $1;
        rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
    }
    if (!-e $request_filename) {
        rewrite ^(.+)$ /index.php?q=$1 last;
    }
    location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ {
        expires 1y;
    }

    Also, for PHP, I strongly suggest using PHP-FPM over FastCGI. Under heavy loads, FastCGI daemon will crash repeatedly, while FPM will take a beating 🙂

    Heavy loads tested = 500 concurrent connections, 100k requests.

Viewing 1 replies (of 1 total)