0

Is is possible to serve a subdomain and the main domain on the same django-cms instance ?

For example: how to serve the following submains and the main domain on the same Django-CMS instance ?

   abc.mydomain.com
   xyz.mydomain.com
   www.mydomain.com

If so, what are needed to be done in Apache httpd.conf and Django-CMS ?

Thank you in advance.

david
  • 101
  • 2
  • @Marco Thank you. It seems that the link you provided does provide solutions to my question. In that question, people suggested option A: Rewrite subdomain to subdirectory, Option B: use Django-subdomains, Option C: use Django-hosts. I guess that any of those will work. Since that article was 6 years old, just wonder which will be best solutions today ? which one will you recommend ? – david Jan 19 '22 at 23:00

1 Answers1

1

What needs to be done with Apache httpd.conf?

<virtualhost *:80>
  ServerName one.example.com
....
</virtualhost>
<virtualhost *:80>
  ServerName two.example.com
....
</virtualhost>

ServerName within the Apache config is what's used to identify and run name-based hosts. You can read more about that here

In regards to the Django-CMS, you'd need to read their documentation as they have a specific setup for hosting multiple sites.