How to configure nginx to serve the images

Posted by Prem on February 6th, 2009 filed in nginx

Add this to your server configuration to configure nginx to serve the static contents like images, css etc.

location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$
{
root /path/to/static/assets;
}

Comments are closed.