Question about subdomains.

31 views
Skip to first unread message

Chen Xu

unread,
Feb 10, 2015, 10:22:29 AM2/10/15
to django...@googlegroups.com
Hi
I am using Django to build a website.

I saw some websites have www.ABC.com, support.ABC.com, and career.ABC.com. I wonder how this is achieved. Are these 3 different apps in 1 project, or 3 different projects.

Thanks



--
⚡ Chen Xu

Tom Christie

unread,
Feb 10, 2015, 11:03:55 AM2/10/15
to django...@googlegroups.com
> Are these 3 different apps in 1 project, or 3 different projects.

Either are possible. It depends on the application.

Bruno Barcarol Guimarães

unread,
Feb 11, 2015, 8:23:18 AM2/11/15
to django...@googlegroups.com
It depends if there is a need to separate the code from the sites on three
projects. If the code is not so complex and you can fit them all on a single
project, you can just configure the web servers to serve the same project on
the three domains.

Tom Evans

unread,
Feb 11, 2015, 3:27:39 PM2/11/15
to django...@googlegroups.com
Technically:

Each name resolves to an IP address. Many names can resolve to one IP.
The browser contacts that IP address and requests a page, including
the server name entered, eg 'career.abc.com'.
The web server decides how to handle that request.
A web server can be configured to respond to requests for different
names in different ways.
It can serve a completely different website for each name, running a
separate web application for each one, each with a different document
root.
Alternatively, it can send all requests to the same web application,
or some mixture of the two.

Django is not a web server, but can be used with all common web
servers to achieve any of the scenarios above. You can run several
distinct and different web applications, one for each name, or one
application could service many names. It's more common to serve many
sites from one django app if all the sites are versions of the same
thing, for instance, forum1.abc.com and forum2.abc.com.

Cheers

Tom

Sergiy Khohlov

unread,
Feb 12, 2015, 12:18:16 AM2/12/15
to django-users

Also one project can serve few domain names.

10 лют. 2015 17:22, користувач "Chen Xu" <xuch...@gmail.com> написав:
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACac-qbEVzrX4W-A2jFMoi5ogTFeptj65kLyH3_UkOQ%3Dw%2BvAWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages