Setup discourse.domain.com with main site at domain.com

I apologize if this seems like a really basic question, what I want to do seems to me like something a lot of people would want to do, but my own use of Google/search couldn’t find anything on it.

I have a site at domain.com (using apache), and I want to have a Discourse forum for that site at forum.domain.com. I want the root domain and the forum domain to resolve distinctly.

I believe I have all the DNS setup correctly, with both the root domain and forum subdomain pointing/resolving to the same IP.

If I install Discourse first, the root domain always redirects to the discourse forum subdomain. So users cannot access the root domain.

And, if I setup apache first with my root domain and try to install Discourse at the forum subdomain, Discourse fails to install and says it can’t resolve the forum subdomain (even though it has no problem with this if I have not already set up apache for the root domain).

So, what am I doing wrong, and what is the proper way to create the setup I am trying to achieve?

1 Like

They should resolve to two different IP’s

Root to the IP of the Apache server
forum. sub-domain to the IP of your Discourse server

2 Likes

I have both on the same server & therefore the same IP. Is that the problem, do I need two servers for this kind of setup? The documentation said forum.domain.com should have same IP as domain.com.

Is there a way to do this without using 2 servers? My client probably doesn’t want to pay to run a 2nd server for what he views as one website.

1 Like

The standard set up for what you want to achieve is two servers.

I believe it is achievable on the same server … I’ve never tried it. Good luck.

You need to educate your client that root and any subdomains are different websites.
Especially if they expect to grow visitor numbers.

4 Likes

You need to educate your client that root and any subdomains are different websites.
Especially if they expect to grow visitor numbers.

Sure, but the same server can run tons of different websites, no?

1 Like

Yes you can. I hope you get it working.

1 Like