Skip to content

nginx better config #2

@AoJ

Description

@AoJ
cat > /etc/nginx/conf.d/caches.conf

## caches
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
    access_log off;
    expires max;
}
location ~* \.(js)$ {
    access_log      off;
    log_not_found   off;
    expires         7d;
}
location ~* \.(woff|svg)$ {
    access_log      off;
    log_not_found   off;
    expires         30d;
}
location ~ /\.ht {
    deny  all;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions