Closed roughnecks closed 10 months ago
Hello, it is possible with configuration in local.js
Let's say you have webdomain
for the web GUI and xmppdomain
for XMPP domain:
var config = {
name: 'XMPP web',
transports: {
websocket: 'wss://webdomain/xmpp-websocket',
},
hasGuestAccess: false,
hasRegisteredAccess: true,
anonymousHost: 'anon.xmppdomain',
isTransportsUserAllowed: false,
hasHttpAutoDiscovery: false,
resource: 'Web XMPP',
defaultDomain: 'xmppdomain',
defaultMuc: 'conference.xmppdomain',
isStylingDisabled: false,
hasSendingEnterKey: false,
connectTimeout: 5000,
pinnedMucs: ['welcome@conference.xmppdomain'],
}
And in proxy conf in Apache (for your webdomain
):
<VirtualHost *:8810>
ServerName webdomain
ServerAlias webdomain
# (...)
# websocket proxy
<IfModule mod_proxy_wstunnel.c>
<Location "/xmpp-websocket">
ProxyPass "ws://xmppdomain:5280/xmpp-websocket"
</Location>
</IfModule>
</VirtualHost>
Hi.
came up with this (using nginx) but I still have problems authenticating: https://paste.woodpeckersnest.space/?c7a8446104c74c16#D3sUYFgrpE4WL9AouWRR2SPdMYUMFGCwb3eJeXSNiR45
This error is repeating in console:
index-0eca49fe.js:15 XMPP error WebSocket ECONNERROR ws://localhost/xmpp-websocket
(anonymous) @ index-0eca49fe.js:15
Ye.emit @ index-0eca49fe.js:15
s.error @ index-0eca49fe.js:15
Ye.emit @ index-0eca49fe.js:15
s.error @ index-0eca49fe.js:15
error (async)
_attachSocket @ index-0eca49fe.js:15
connect @ index-0eca49fe.js:15
connect @ index-0eca49fe.js:15
connect @ index-0eca49fe.js:15
TS.t.connect @ index-0eca49fe.js:15
reconnect @ index-0eca49fe.js:15
(anonymous) @ index-0eca49fe.js:15
setTimeout (async)
scheduleReconnect @ index-0eca49fe.js:15
s.disconnect @ index-0eca49fe.js:15
Ye.emit @ index-0eca49fe.js:15
_status @ index-0eca49fe.js:15
s.close @ index-0eca49fe.js:15
Ye.emit @ index-0eca49fe.js:15
s.close @ index-0eca49fe.js:15
index-0eca
why does it say localhost?
Can you type window.config.transports.websocket
in console please?
On XmppSocket.js, it create a XMPP object with the socket in service
attribute.
If no value is provided, the XmppClient.js use ws://localhost:5280/xmpp-websocket
as default.
I'm betting on an error in your local.json file.
@roughnecks I think it works now 😉
window.config.transports.websocket
'ws://localhost/xmpp-websocket'
did you check my paste? Config is there
working now, not sure if this line was needed:
// eslint-disable-next-line no-unused-vars, no-var
Not useful in production, it is for avoid linter complaints.
Hello,
I have my prosody server at woo...t.space and I have my website at the same domain
Is there a way for me to host the webchat, so that it doesn't collide with my website?
I can host at a subdomain, but then my login credential don't work, since it tries to connect to e.g. webchat.woo...t.space, which is not my xmpp server's virtualhost.