Im developing two different chatbots and I have them on a Google Platform VM. I want to know how to access to them like this:
-> https://example.com/chatbot1
-> https://example.com/chatbot2
Instead of having:
I want to do that so I can run multiple chatbots on the same VM and I dont expose the ports. After doing this the idea is to insert the chatbot on a 3rd user web like this:
<script>
WebChat.default.init({
selector: "#webchat",
initPayload: "XXX",
interval: 1000,
customData: {"userId": "123"},
socketUrl: "http://example.com/chatbot1",
socketPath: "/socket.io/",
title: "XXX",
subtitle: "XXX",
inputTextFieldHint: "XXX",
connectingText: "XXX",
hideWhenNotConnected: true,
fullScreenMode: false,
showFullScreenButton: false,
profileAvatar: "xxx.jpg",
params: {
images: {
dims: {
width: 250,
height: 200,
}
},
storage: "XXX",
},
})
</script>
Both need to run through HTTPS. Do I need Apache or something similar? If this is the case, how can I configure it? I dont know if it is relevant but I only have access to the VM through SSH.
It sounds like you might want to use Apache's name-based virtual hosts (see the example under Running different sites on different ports).