Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


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.