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.

Is it possible to configure globally only the http part of nginx.conf to have all sites using the same error pages, without having to add some lines to each of the sites?

I'm not talking about the error page configuration per site.
Also not talking about having the same error page shared among multiple/all sites, using aliases.

The problem with these solutions is that it requires a configuration setup per site.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

According to nginx documentation error_page directive is allowed in following locations: http, server, location, if in location.

share|improve this answer
    
Thanks for your answer. How do you declare default error pages in the http section? –  ring0 May 30 '11 at 12:03
    
The same as in a server section. –  mgorven Apr 19 '12 at 22:54

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.