tonyx86
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-FFPC] NGiNX 404'sHello! congratulations, this plugin is great! However I have the same issue, tryed different config. comment try_files $uri = 404 do not work for me (and I read that creates a security problem related to static files containing) the only page that work is the index, and it is served by php (no debug header found):
location / {
try_files $uri $uri/ /index.php?$args;
}location @memcached {
default_type text/html;
set $memcached_key data-$scheme://$host$request_uri;
set $memcached_request 1;# exceptions
# avoid cache serve of POST requests
if ($request_method = POST ) {
set $memcached_request 0;
}
# avoid cache serve of wp-admin-like pages, starting with “wp-“
if ( $uri ~ “/wp-” ) {
set $memcached_request 0;
}
# avoid cache for logged in users
if ($http_cookie ~* “comment_author_|wordpressuser_|wp-postpass_” ) {
set $memcached_request 0;
}if ( $memcached_request = 1) {
memcached_pass memcached;
error_page = 404 @rewrites;
}if ( $memcached_request = 0) {
rewrite ^ $request_uri last;
}
}## rewrite rules
location @rewrites {
rewrite ^ /index.php$request_uri last;
}location ~ \.php$ {
try_files $uri = 404;
fastcgi_index index.php;
fastcgi_pass php5-fpm-sock;
fastcgi_send_timeout 30;
fastcgi_read_timeout 30;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires 30d;
add_header Pragma public;
add_header Cache-Control “public, must-revalidate, proxy-revalidate”;
}Thanks, best regards (And forgive my English ?? )