The best approach I've found is to use xip.io. xip.io is a service that is
actually provided by the 37 Signals guys, but it works for any web project
(not just Rails). I'll honour a good idea wherever it comes from.

It's a DNS server with unusual behaviour: If you prepend an IP address to
the start of .xip.io, it will return that IP address as the resolved IP for
the domain.

So - if you set your server running on 127.0.0.1:8000, but point your
browser at http://127.0.0.1.xip.io:8000, it will resolve to 127.0.0.1.

Then, you can use your subdomain; bob.127.0.0.1.xip.io:8000 will resolve to
your development server, but with a request header that tells you the
subdomain.

I've found it very useful for testing subdomains.

Yours,
Russ Magee %-)

On Sun, Jan 27, 2013 at 7:47 AM, Brian Dant <[email protected]> wrote:

> I'm trying to create a development environment that supports testing my
> subdomain configuration.  I'll be using the django-subdomains package,
> which relies on the sites framework.  *To make a local environment that
> supports this while using the Django built-in webserver, do I need to set
> up local DNS?*  Most of the solutions I see rely on Apache, and refer to
> the /etc/hosts file.  I've tried to use that, but nothing happens when I
> hit the name I think should map to 127.0.0.1:8000.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to