Testing Server without domain name

António P. P. Almeida appa at perusio.net
Sat Jul 23 12:20:33 UTC 2011


On 23 Jul 2011 13h07 WEST, christian.freisen at googlemail.com wrote:

> Hi There,
>
> at the moment I'm waiting for my Domain-Name (because of some
> problems this will last a few days).
>
> Now I wanna test nginx only with IP-Adress.  This is no Problem for
> Default but how about sub-Domains?  Is it possible to internally map
> 1.2.3.4/abrakadabra to abrakadabra.1.2.3.4?  With domain-Name this
> seems to be no problem, but without?

EDIT: Oops. Not yet fully awaken: not loop, but loopback :)

Not sure I understand your question. But I run nginx on my dev
machines using only the loopback device. Most of my stuff are drupal
sites. I run each site on a different port. That way the dev
environment gets easily mapped to the production environment by just
changing a few values of some key directives, like listen, root and
specifying a server_name.


E.g.:

server {
   listen [::]:8801;

   (...)
}

Or 

server {
   listen 1.2.3.4:80;

   (...)
}

...

server {
   listen 1.2.3.4:8080;

   (...)
}

HTH,
--- appa



More information about the nginx mailing list