
index index.php;

location / {
    # This is cool because no php is touched for static content.
    # include the "?$args" part so non-default permalinks doesn't break when using query string
    try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
    try_files $uri = 404;
    fastcgi_hide_header X-Powered-By;

    include        fastcgi.conf;
    fastcgi_pass unix:/var/run/php-fpm_blog.sock;
    fastcgi_index index.php;
}

# Directives to send expires headers and turn off 404 error logging.
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
    access_log off; 
    log_not_found off; 
    expires max;
}
