Which Nginx template for PHP scripts?
Which Nginx template for PHP scripts?
Dear devs & community! First thank you for this great and fast panel!
I'm thinking, which Nginx template I should use for PHP scripts:
- Ajax script sending many mysql requests (/per user)
- API script that generates JSON for mobile app
- Wordpress with several plugins
Documentation says that "default" template is for static content — so should I use "caching" template for dynamic apps with big traffic?
Thank you/Благодарю
I'm thinking, which Nginx template I should use for PHP scripts:
- Ajax script sending many mysql requests (/per user)
- API script that generates JSON for mobile app
- Wordpress with several plugins
Documentation says that "default" template is for static content — so should I use "caching" template for dynamic apps with big traffic?
Thank you/Благодарю
Re: Which Nginx template for PHP scripts?
Yeah, why not?
Here is code for caching template:
Cache for all, but this is exceptions. Non-cached content get users with cookies
Here is code for caching template:
Code: Select all
proxy_cache cache;
proxy_cache_valid 15m;
proxy_cache_valid 404 1m;
proxy_no_cache $no_cache;
proxy_cache_bypass $no_cache;
proxy_cache_bypass $cookie_session $http_x_update;