Why two domains in nginx configuraiton file?


Nginx production file has two domains “home.myopenhab.org” and “myopenhab.org” which are listening on port 3000 and 3001.

May I know what is the significance of having two domain names ?

One is called “webapp” and another “socketapp” as below.

upstream webapp {

upstream socketapp {

Is it compulsory to use both of them ?

Please throw some light on it.


1 Like

myopenhab.org is the domain that gets used when interacting with the openHAB Cloud Server itself. For example adding users, logging in, browsing notifications, etc.

home.myopenhab.org us the domain that is used when you are accessing your openHAB UIs proxied through the openHAB Cloud Server. So access to your dashboard would use https://home.myopenhab.org/start/index. To access PaperUI you would use https://home.myopenhab.org/paperui/index.html. etc.

I do not know why they split the two into separate domains but I’m sure there were reasons. One thing I can see is that the two domains point to different ports so if you didn’t have two domains you would have to supply the port numbers yourself. For example, when I want to interact with the Cloud Server I would have to go to https://myopenhab.org:3000 and when I want to get to my OH UIs I would have to use https://myopenhab.org:3001/start/index.

1 Like