# Testing Server without domain name

**URL:** <https://www.ruby-forum.com/t/testing-server-without-domain-name/209816>\
**Category:** NGINX\
**Created:** [July 23, 2011, 2:08pm UTC](https://www.ruby-forum.com/t/testing-server-without-domain-name/209816 "2011-07-23T14:08:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [July 23, 2011, 2:08pm UTC](https://www.ruby-forum.com/t/testing-server-without-domain-name/209816/1 "2011-07-23T14:08:59Z")

</div>

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?

Thanks allot - and sry I’m a beginner.  
Chris

---

<div class="post-metadata">

**Author:** ![Christian\_Becker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce73a5/32.png) [@Christian\_Becker](https://www.ruby-forum.com/u/Christian_Becker)\
**Post date:** [July 23, 2011, 2:19pm UTC](https://www.ruby-forum.com/t/testing-server-without-domain-name/209816/2 "2011-07-23T14:19:30Z")

</div>

On 23 Jul 2011 13h07 WEST, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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?

Not sure I understand your question. But I run nginx on my dev  
machines using only the loop 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

---

<div class="post-metadata">

**Author:** ![Christian\_Becker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce73a5/32.png) [@Christian\_Becker](https://www.ruby-forum.com/u/Christian_Becker)\
**Post date:** [July 23, 2011, 2:22pm UTC](https://www.ruby-forum.com/t/testing-server-without-domain-name/209816/3 "2011-07-23T14:22:36Z")

</div>

Hi

I assume you’re talking about a public domain. If you don’t have a  
domain name, how can you map sub-domains?  
If you only have a public IP address, that’s all you have. At most you  
can use 1.2.3.4/subfolder

If you mean a private network, i don’t get your domain issues. If the  
server is in a LAN i do what António Almeida does and change ports.

HTH,  
Nuno

–  
“On the internet, nobody knows you’re a dog.”

---

<div class="post-metadata">

**Author:** ![Christian\_Becker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce73a5/32.png) [@Christian\_Becker](https://www.ruby-forum.com/u/Christian_Becker)\
**Post date:** [July 23, 2011, 2:23pm UTC](https://www.ruby-forum.com/t/testing-server-without-domain-name/209816/4 "2011-07-23T14:23:13Z")

</div>

On 23 Jul 2011 13h07 WEST, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![Christian\_Becker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce73a5/32.png) [@Christian\_Becker](https://www.ruby-forum.com/u/Christian_Becker)\
**Post date:** [July 24, 2011, 3:42pm UTC](https://www.ruby-forum.com/t/testing-server-without-domain-name/209816/5 "2011-07-24T15:42:49Z")

</div>

Hi

sure this looks fine for me,  
just be aware of the changes regarding your  
dns servers, some providers do it a different way than usual.  
if you have the primary dns server assigned to your server,  
the you\*ll have no problems

kind regards,  
malte

Am 24.07.2011 um 00:11 schrieb Gelonida:

---

<div class="post-metadata">

**Author:** ![Christian\_Becker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce73a5/32.png) [@Christian\_Becker](https://www.ruby-forum.com/u/Christian_Becker)\
**Post date:** [July 23, 2011, 3:55pm UTC](https://www.ruby-forum.com/t/testing-server-without-domain-name/209816/6 "2011-07-23T15:55:59Z")

</div>

You can privately map the domain name to your ip address by adding an  
entry to the hosts file (or a private dns server) on your test client.  
This way you don’t have to change anything in nginx.

Hendrik

Am Sa, 23.07.2011, 14:07 schrieb Christian Becker:
