Welcome! Log In Create A New Profile

Advanced

fastcgi caching for https only site.. some questions

Posted by ura 
ura
fastcgi caching for https only site.. some questions
January 13, 2014 12:47AM
greetings all!

i have been configuring a relatively low powered virtual server to serve a php app (a social network that is built using the elgg framework).
i read this page (http://seravo.fi/2013/optimizing-web-server-performance-with-nginx-and-php) about optimising the nginx server and ran through the benchmarking process described there - tweaking various nginx options.

i saw that my site's pages are loading much more slowly than the server in the examples on that linked page - however my server is 1 cpu and 1GB RAM presently.. and the site is https only - so i comprehend that the speed is likely to be slower.

my question is that the best performance graph i saw from my site so far was with this in nginx.conf:

fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m;
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
keepalive_requests 100000;

gzip_static on;

and my own version of the caching logic that was used in the example on the seravo.fi page - adapted from wordpress to elgg (as best i could with what i know currently). you can view the graph i made of the various configurations i tested here: https://www.infiniteeureka.com/_graphics/img/nginx-graph.png

- the white line is with the tweaked config files + the caching enabled.

however.. what i am not comprehending is why i am not seeing the type of 'full html caching' performance that is shown in the tutorial/guide on seravo.fi.. i was aiming to have the whole page cached - but that is not occurring.
my first thought is that maybe the caching headers are wrongly set.. or not set for some reason..
i have these lines in the config for the site:

location ~* \.(css|js|html|htm)$ {
expires max;
gzip_static on;
log_not_found off;
add_header Pragma "public";
add_header Cache-Control "public";
}
location ~* \.(jpg|jpeg|gif|png|mp3|flv|mov|avi|3pg|swf|ico|woff|cur|htc|webm|ttf)$ {
expires max;
gzip_static off;
log_not_found off;
add_header Pragma "public";
add_header Cache-Control "public";
}

if anyone has any tips i will glady experiment with them..
once i have this perfected i will share with the elgg community at least to get them more inspired to use nginx.

my thanks in advance for any help here.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 112
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready