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'm setting up a nginx webserver locally with this config:

server { server_name im;

access_log /var/www/im/website.access_log;
error_log /var/www/im/website.error_log;

root /var/www/im;
index index.php index.htm index.html;

location ~ .php$ {
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME /var/www/im/$fastcgi_script_name;
include fastcgi_params;


I want to access the local-hosted site with "im/", instead, i get a "not found". The only thing that works is "localhost". Is this possible? What should i correct/add to my config?

share|improve this question
up vote 1 down vote accepted

The name needs to resolve from the system -- you'll need to add the name to your /etc/hosts file.

share|improve this answer
Yes! Thanks a lot! <3 – Gabriel A. Zorrilla Apr 30 '11 at 21:30

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.