moebius icon indicating copy to clipboard operation
moebius copied to clipboard

Multiple Server Instances

Open hybridlabor opened this issue 4 years ago • 3 comments

Hello, I've launched two server instances in two seperate screen sessions, utilizing different ports and a different .ans file Then there is nginx web proxy server, listening to two different domains, and then sending users to the respective localhost:8000 and 8001 ports. However, when connecting to either of them servers (it works) but you edit the same ansi file. Which is kinda strange? One of the servers is public, the other has a password set. Is there a limitation on running two instances on the same server, with multiple subdomains pointing to different ports ?

hybridlabor avatar Feb 05 '22 12:02 hybridlabor

Are you running the servers from different directories? Note also thay you can specify the port number directly into the client with hostname:portnumber as server address. Both server and client need to be on the latest version for this to work.

bart-d avatar Feb 05 '22 14:02 bart-d

Running them from the same directory, however a copied version of server.js named somethingelse.js - and ofcourse a different .ans file aswell as different server port and web port. The Nginx Proxy handles the subdomain referal to lets say sub.domain.com -> localhost:8000 and sub2.domain.com -> localhost:8001 - so there is no need to enter ports in the moebius client. It feels as if, the moebius client connects to the same server (first one) because the IP is the same? I'll give it a try with a seperate directory though. thanks

hybridlabor avatar Feb 06 '22 10:02 hybridlabor

If they re both on the same IP address, you're out of luck. Moebius uses websockets and virtual domain hosting is not really supported. So whatever you do with this setup it will always connect to the same server instance running on the default port. This is why the multiple ports feature was introduced, to be able to run multiple servers on the same IP address.

bart-d avatar Feb 06 '22 16:02 bart-d