ejabberd - Comments for "Serving crossdomain.xml problem" https://www.ejabberd.im/node/4880 en foobarius wrote: Here's the https://www.ejabberd.im/node/4880#comment-57677 <div class="quote-msg"> <div class="quote-author"><em>foobarius</em> wrote:</div> <p>Here's the ejabberd.log output from the request with the second 5280 section in use:</p> <div class="codeblock"><code>=ERROR REPORT==== 2011-08-01 15:41:01 ===<br />E(&lt;0.1178.0&gt;:mod_http_fileserver:306) : Received an HTTP request with Host &quot;s323.foo.org&quot;, but couldn&#039;t find the related ejabberd virtual host</code></div> <p>I've googled all over the place and most hits are years old. I've tried many proffered solutions, but with no success. </p></div> <p>Have you read that error report? It says that you have in ejabberd.cfg something like<br /> {hosts, ["server.domain.com"]}.<br /> But you send the HTTP query indicating s323.foo.org as Host destination.</p> <div class="quote-msg"> <div class="quote-author"><em>foobarius</em> wrote:</div> <p>if I change the 5280 section above to:</p> <div class="codeblock"><code>{5280, ejabberd_http, [<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; web_admin,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {request_handlers, [{[&quot;xmpp-httpbind&quot;], mod_http_bind} ,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {[], mod_http_fileserver}] }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ] }</code></div> <p>Web admin access no longer works, the BOSH test page no longer works and I get a 404 from <noindex><a href="http://server.domain.com:5280/crossdomain.xml" title="http://server.domain.com:5280/crossdomain.xml" rel="nofollow" >http://server.domain.com:5280/crossdomain.xml</a></noindex>.<br /> There is a crossdomain.xml in /opt/ejabberd-2.1.8/www that is readable by ejabberd process. </p></div> <p>This configuration works for me:</p> <pre> {5280, ejabberd_http, [ {request_handlers, [ {["http-bind"], mod_http_bind}, {["admin"], ejabberd_web_admin}, {[], mod_http_fileserver} ]} ]}, </pre><pre> $ lynx -mime_header <noindex><a href="http://localhost:5280/crossdomain.xml" title="http://localhost:5280/crossdomain.xml" rel="nofollow" >http://localhost:5280/crossdomain.xml</a></noindex> HTTP/1.0 200 OK Connection: close Content-Length: 39 Server: ejabberd Last-Modified: Tue, 02 Aug 2011 15:25:46 GMT Content-Type: application/xml This is just a dummy crossdomain file. </pre><pre> $ lynx -mime_header <noindex><a href="http://localhost:5280/admin/" title="http://localhost:5280/admin/" rel="nofollow" >http://localhost:5280/admin/</a></noindex> HTTP: Access authorization required. Use the -auth=id:pw parameter. Looking up localhost:5280 Making HTTP connection to localhost:5280 Sending HTTP request. HTTP request sent; waiting for response. Alert!: Access without authorization denied -- retrying lynx: Can't access startfile <noindex><a href="http://localhost:5280/admin/" title="http://localhost:5280/admin/" rel="nofollow" >http://localhost:5280/admin/</a></noindex> </pre><pre> $ lynx -mime_header <noindex><a href="http://localhost:5280/http-bind/" title="http://localhost:5280/http-bind/" rel="nofollow" >http://localhost:5280/http-bind/</a></noindex> HTTP/1.0 200 OK Connection: close Content-Length: 502 Content-Type: text/xml; charset=utf-8 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Content-Type &lt;?xml version='1.0'?&gt; ejabberd mod_http_bind... </pre> Tue, 02 Aug 2011 15:34:18 +0000 mfoss comment 57677 at https://www.ejabberd.im