Page 1 of 1

Which Nginx template for PHP scripts?

Posted: Sat Jan 03, 2015 12:05 pm
by blackside
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/Благодарю

Re: Which Nginx template for PHP scripts?

Posted: Sat Jan 03, 2015 12:52 pm
by skurudo
Yeah, why not?

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;
Cache for all, but this is exceptions. Non-cached content get users with cookies