Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to have these rules on ALL sites. I just have no idea how to do it.

location = /favicon.ico {
    expires 168h;
    log_not_found off;
    access_log off;
    #return 404;
}

location = /robots.txt {
    expires 168h;
    log_not_found off;
    access_log off;
}

location = /someotherlocation.ext {
    log_not_found off;
    access_log off;
}
share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

I don't think this is possible.
Workaround: move these settings to a separate file and include it in every server.

share|improve this answer
add comment

Put it in a file and include this file in all your virtual host.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.