Multi Domain Setting in PC

I try to setup a discourse in my local pc, and it should be multi site environment

I create several domain in /etc/hosts

The process from launcher bootstrap app and launcher start app, run well

docker ps also show the docker container

but I cannot access to or

but can access throught localhost

is there a missing thing that I should set to make the discourse can run on one of the domain

my plan to add another domain /site also in the container

search google on how to configure a DNS server for your web site

Which OS are you running on your PC? The /etc/hosts is for Unix-like OS the right place, but on Windows, you need to go to C:\Windows\System32\Drivers\etc\hosts.

i use ubuntu right now

should we install DNS rather add ip and domain in hosts?

Yeah, you should be setting up DNS. .int is a real top-level domain, and both of those domains you listed are available for purchase.

1 Like

so using the ip + domain inside hosts file is not a good implementation?

Well, when the domains you picked are available for purchase and anyone could grab them up… you shouldn’t be putting servers on those domains.

If you really want to use a hosts file, you need to end the domain with .local .

Wait a minute… if this is really only about testing, the /etc/hosts should be fine. @riking is right about the real TLD, but a local override should always work - I do this when I’m testing stuff before going live. You could even use something as absurd as and prepare to lose all Google connectivity. If you plan to purchase said domains, go ahead. If you want to take a safer route, use .local.

In order to diagnose the problem further, you can test your setup using ping from the Terminal and see if the resolver library uses the correctly.


This had to be said, sooner or later!