Debianzone http://debianzone.posterous.com Most recent posts at Debianzone posterous.com Wed, 17 Mar 2010 17:16:00 -0700 Page level caching using nginx http://debianzone.posterous.com/page-level-caching-using-nginx http://debianzone.posterous.com/page-level-caching-using-nginx

Many of our dynamic sites contain rarely updated content (ex. blog archive page). By adding nginx server as proxy server infront of your apache server you can server those pages like static pages instead of running the page for every request, this will boost your site speed from 50% - 400%. We need apache, nginx to work with this tutorial To install nginx on debian please follow this link http://timothybowler.com/2009/11/25/compiling-nginx-on-debian-lenny/ Note: Dont install using aptitude it contains older version where gzip and proxy module not available, Modify apache ports.conf to run apache on port 8080 Add this lines to default site of nginx [shell]

server { listen 80; server_name debianzone.com; location / { proxy_pass http://debianzone.com:8080; proxy_cache debianzone-cache; proxy_cache_valid 200 302 60m; proxy_cache_valid 404 1m; } } [/shell] Add this in http section of nginx.conf[shell] http { proxy_cache_path /var/www/cache levels=1:2 keys_zone=debianzone-cache:8m max_size=1000m inactive=600m; proxy_temp_path /var/www/cache/tmp; }

[/shell]

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/894020/a9105079458196173bfc8734807b32ed.jpeg http://posterous.com/users/4xlDDq0UWIA9 Sandeep Manne smanne Sandeep Manne