Ludo
Ludo

Reputation: 5280

Subdomain on localhost with Nginx

I would like to catch project1.localhost, here is the conf i tried but it doesn't catch anything.

server {
       listen 80;

       server_name project.localhost;

       location / {
                proxy_pass      http://127.0.0.1:3000/;
        }
}

Upvotes: 2

Views: 3542

Answers (1)

ruslan
ruslan

Reputation: 46

Add line 127.0.0.1 project.localhost to your hosts file (/etc/hosts in *nix).

Upvotes: 3

Related Questions