1

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?

Ward - Trying Codidact
  • 12,899
  • 28
  • 46
  • 59
Gabriel
  • 436
  • 2
  • 7
  • 19

1 Answers1

2

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

Shane Madden
  • 114,520
  • 13
  • 181
  • 251