Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi, i have FastCGI enabled and its working perfectly on my main site. but for my other sites which is in sub directory multisite setup, FastCGI is caching even the admin area too. i dont understand why FasctCGI is not bypassing sub-directory sites admin area when cache bypass is working for main sites admin area. i have opcache enabled as well. is that might be any issue here?
here is the response header from post page
Request URL:http://mysite.com/site2/wp-admin/edit.php
Request Method:GET
Status Code:200 OK
Remote Address:139.162.171.19:80
Referrer Policy:no-referrer-when-downgrade
Cache-Control:no-cache, must-revalidate, max-age=0
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html; charset=UTF-8
Date:Tue, 28 Mar 2017 16:17:56 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Server:nginx/1.10.3
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Cache:HIT
X-Frame-Options:SAMEORIGIN
and these are my FastCGI config
fastcgi_cache_path /var/run/cache levels=1:2 keys_zone=MYAPP:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
add_header X-Cache $upstream_cache_status;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
#Cache everything by default
set $no_cache 0;
#Don't cache POST requests
if ($request_method = POST) {
set $no_cache 1;
}
#Don't cache if the URL contains a query string
if ($query_string != "") {
set $no_cache 1;
}
#Don't cache the following URLs
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $no_cache 1;
}
#Don't cache if there is a cookie called PHPSESSID
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $no_cache 1;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
# try_files $uri $uri/ /index.html;
# try_files $uri $uri/ =404;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
include fastcgi_params;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_cache MYAPP;
fastcgi_cache_valid 200 60m;
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
}
and this is what i have for enabling multi-site
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
Georgy Nepotachev
004d858977ad4c85bea111ad25fe8c
George Chanturidze
SwimmingTealEel
LEMP_newb
clayrain
Prabhupad
c4d4ee9a3201418b9612e07f964253
jmzeph
ashokvde59
testrunner666
tylerrutt17