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'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_pass   127.0.0.1:9000;
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
add comment

1 Answer

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