Multi Domain Setting in PC


(Frans Thamura) #1

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

I create several domain in /etc/hosts

127.0.0.1 mutiara-iman.int
127.0.0.1 ortukat.int

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

docker ps also show the docker container

but I cannot access to http://ortukat.int or http://mutiara-iman.int

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


(omfg) #2

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


(Joe Seyfried) #3

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.


(Frans Thamura) #4

i use ubuntu right now

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


(Kane York) #5

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.


(Frans Thamura) #6

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


(Kane York) #7

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 .


(Joe Seyfried) #8

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 127.0.0.1 google.com 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 ortukat.int from the Terminal and see if the resolver library uses the 127.0.0.1 correctly.


(omfg) #9

:laughing:

This had to be said, sooner or later!