Problem with routes while in development

I have come across an issue that I am sure is an issue, but have wondered why I have only come across this problem now. In which I think it is because this is the first time I have used a domain name to browse the development site rather than IP address.

Anyway in the routes.cfm it has and uses cgi.http_host this is all and good but I am in apposition where this is causing an issue with remote and local development to my server. Locally I use the IP address because it works, the domain doesn’t as it has to go out from the router and back in and for some reason the router sees it as local and cracks it.

Long story short, when remote there is a different IP address to the server, and is port forwarded via the router. The problem is that when I use the event.BuildLink() and browse from the internal network all is fine, but as soon as I or someone else browses from remote it hangs when any page uses the event.buildLink().

Viewing of the source shows that the internal IP address is still being used. Now this is only a problem while in development, but development this needs to be addressed.

My question is what would be the best way to approach this?

Regards,

Andrew Scott

http://www.andyscott.id.au/

Sounds like a network / firewall issue to me.

No it is not a network / firewall issue, the problem is the router when
using the domain name internally will not browse the port forwarded and
instead will use the routers admin interface. This means I am forced to use
the IP address internally.

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of Sean Corfield
Sent: Monday, 23 August 2010 3:30 PM
To: coldbox@googlegroups.com
Subject: Re: [coldbox:5430] Problem with routes while in development

Sounds like a network / firewall issue to me.

> I have come across an issue that I am sure is an issue, but have
> wondered why I have only come across this problem now. In which I
> think it is because this is the first time I have used a domain name
> to browse the development site rather than IP address.
>
>
>
> Anyway in the routes.cfm it has and uses cgi.http_host this is all and
> good but I am in apposition where this is causing an issue with remote
> and local development to my server. Locally I use the IP address
> because it works, the domain doesn't as it has to go out from the
> router and back in and for some reason the router sees it as local and

cracks

The router is (part of) your network :slight_smile:

So it's a hardware issue, not a ColdBox issue.

Well I never actually said it was a ColdBox problem, it is a problem that I
would like to know how to get around. And yes it is a hardware error of
sorts, I would lean more towards the router needing a firmware update to
cater for it.

Regards,
Andrew Scott
http://www.andyscott.id.au/

Andrew,

I have a similar setup, and what I do is to modify the hosts file in
the local network client: I have a server that can be reached from the
internet and from the local network (myserver.mypublicdomain.com). If
I want to access it from the local network I could use the
192.168.1.200 ip but, in order to avoid the kind of problems you are
having, I add an entry to the hosts file in the local network client:

192.168.1.200 myserver.mypublicdomain.com

This way, all accesses use the same domain name, and the buildLink
always produces the same links. You can even use a different port, and
it still works fine.

HTH,

Pedro.