Home > other >  Nginx server name after the parametric images, how to use nginx cache
Nginx server name after the parametric images, how to use nginx cache

Time:09-27


Original nginx cache Settings is
 
The location ~. * \. (GIF | JPG | jpeg | PNG | BMP | SWF) $
{
expires 30d;
}




Due to the needs of the mobile terminal access, I gave a parameterized graphics, on the surface of the request is for images, actually be redirected to the index. The PHP page,

Parametric set:
 
The location/{
Rewrite/(. *) _ (. *) _ (. *) _ (. *) _ (. *) _ (. *). JPG/index. PHP? NetType=$1 & amp; Width=$2 & amp; Height=$3 & amp; PId=$4 & amp; SkuId=$5 & amp; The index=$6 last;
}




How do I continue to use nginx cache??

CodePudding user response:

There is no answer

CodePudding user response:

You this is the PHP file to read the file, nginx seems to do cache,

CodePudding user response:

See nginx log if there is any error, such as the error log reported what permissions, such as not enough; If there is no see nginx cache file is finally? What is index. PHP or other, if not solved, see you use is proxy_cache module or proxy_store module, if not change another try,
  • Related