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

We are using nginx to serve static content and apache for dynamic content.

I have defined a default server configuration as:

#Set a default server that simply proxies all requests to apache
    listen 80 default_server;
    server_name _;

    location / 

Is the the best way to proxy everything to apache if for some reason a server_name does not match?

share|improve this question
I do not get your question, this is a copy-paste from the nginx wiki. Are you asking whether the nginx wiki is correct? Erm, yes, it is... – chx Sep 27 '12 at 18:04
What I am asking is, if I want to proxy all requests to apache, is this the best way? – Chris Muench Sep 27 '12 at 18:13
up vote 3 down vote accepted

Yes this is the best and the only sensible way. You could even omit the servername completely.

share|improve this answer

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.