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?


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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.