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 am wondering what the http block does in Nginx. I don't see many tutorials talking about when it is necessary to use that block, and many examples do not use it at all.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

The http block is required for any nginx configuration that is intended to act as a HTTP(S) server. It often isn't included in examples, because most people use nginx for HTTP(S) service, however if you're using nginx to proxy (for example) IMAP/POP3, you don't need a http block.

share|improve this answer
    
Fair enough. ;) –  Shane Madden Jul 6 '12 at 5:04
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.