Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Server Instances #205

Open
hybridlabor opened this issue Feb 5, 2022 · 3 comments
Open

Multiple Server Instances #205

hybridlabor opened this issue Feb 5, 2022 · 3 comments

Comments

@hybridlabor
Copy link

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 ?

@bart-d
Copy link
Contributor

bart-d commented Feb 5, 2022

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.

@hybridlabor
Copy link
Author

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

@bart-d
Copy link
Contributor

bart-d commented Feb 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants