[ejabberd] mod_rest

Ricky Gutierrez xserverlinux at gmail.com
Wed Aug 23 21:01:24 MSK 2017


2017-08-23 2:45 GMT-06:00 Badlop <badlop at gmail.com>:
> Hi,
>
> I imagine you have something like this:
> hosts:
>  - "example.com"
> But later in the wget query you send the request to "localhost". This
> is what the error complains about.
>
> Two possible solutions:
> A) Send the request to example.com, or whatever vhost you have enabled
> in ejabberd.yml
> B) Or add localhost to the list of vhosts served by ejabberd
>
Hi badlop , thank for you answer , I made the change and add the
localhost in hosts:

hosts:

  - " mydomain"
  - "localhost"

I try to connect to wget and it does not work for me.

Trying with my domain

wget http://localhost:5285/rest/ --server-response --post-data
'<message to=“ricardog at mydomain"
from="mydomain/rest"><body>World</body></message>'
--2017-08-23 11:54:05--  http://localhost:5285/rest/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:5285... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:5285... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 406 Not Acceptable
  Content-Type: text/html; charset=utf-8
  Content-Length: 43
2017-08-23 11:54:05 ERROR 406: Not Acceptable.

Trying with localhost

wget http://localhost:5285/rest/ --server-response --post-data
'<message to=“ricardog at localhost"
from="localhost/rest"><body>World</body></message>'
--2017-08-23 11:50:34--  http://localhost:5285/rest/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:5285... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:5285... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 406 Not Acceptable
  Content-Type: text/html; charset=utf-8
  Content-Length: 43
2017-08-23 11:50:34 ERROR 406: Not Acceptable.


I'm trying with something simple, I do not want to enter with
something more complex according to your documentation of the module.

regardss



-- 
rickygm

http://gnuforever.homelinux.com


More information about the ejabberd mailing list