File nginx_static of Package nginx

##
## Definitions for serving static files
##

##
## This file intended to be included in vhost configuration as
##
## include vhosts.d/_static;
##
## Note that if you use php (php-fpm) include this file AFTER php definition
## because some PHP-frameworks serving static files via PHP logic
##

location = /robots.txt {
    allow         all;
    log_not_found off;
    access_log    off;
}

# Web Proxy Auto-Discovery
location = /wpad.dat {
    types        { }
    default_type application/x-ns-proxy-autoconfig;
}

# Empty favicon
location   @empty_gif   { empty_gif; }
location = /favicon.gif { try_files $uri @empty_gif; }

# Static files
location ~* \.(?:html|txt|jpg|jpeg|gif|png|bmp|ico|svg|swf|css|js|ttf|woff)$ {
    expires    max;
    add_header Pragma        "public";
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
openSUSE Build Service is sponsored by