[ejabberd] Serving http error 404

six at sixweb.hu six at sixweb.hu
Mon Aug 27 01:15:24 MSK 2012


 

Dear List Members, 

I use ejabberd 2.1.2 on Ubuntu 10.04 server
(erlang 1:13.b.3). XMPP works fine but I can't make mode_http_fileserver
deliver a webpage while administration interface works fine on port
5280. (I'd like to set up iJab, finally.) 

The question is, why am I
getting 404 and how could I debug this? 

Config snippets: 

Listen
section: 

 {5280, ejabberd_http, [
 %%{request_handlers,
 %% [
 %%
{["pub", "archive"], mod_http_fileserver}
 %% ]},
 %%captcha,

{request_handlers,
 [
 {["chat"], mod_http_fileserver}
 ]},
 http_bind,

http_poll,
 web_admin
 ]}

Modules section: 

 {mod_http_fileserver, [

{docroot, "/var/www-data/ijab"},
 {accesslog,
"/var/log/ejabberd/access.log"}
 ]},

Then I went to
http://sitename:5280/chat/iJab.html and I expected to get the html page
but unfortunately I got a 404 with every try. 

I set loglevel to 5 and
I got only this: 

I(<0.38.0>:ejabberd_app:69) : ejabberd 2.1.2 is
started in the node ejabberd at cerebellum

=INFO REPORT==== 2012-08-26
21:44:10 ===
I(<0.352.0>:ejabberd_listener:232) : (#Port<0.2765>)
Accepted connection {{192,168,0,10},42154} ->
{{192,168,0,1},5280}

=INFO REPORT==== 2012-08-26 21:44:10
===
D(<0.353.0>:ejabberd_http:135) : S:
[{["chat"],mod_http_fileserver},
 {["admin"],ejabberd_web_admin},

{["http-bind"],mod_http_bind},

{["http-poll"],ejabberd_http_poll}]

=INFO REPORT==== 2012-08-26
21:44:10 ===
I(<0.353.0>:ejabberd_http:137) : started:
{gen_tcp,#Port<0.2765>}

=INFO REPORT==== 2012-08-26 21:44:10
===
D(<0.353.0>:ejabberd_http:254) : (#Port<0.2765>) http query: 'GET'
/chat/iJab.html

=INFO REPORT==== 2012-08-26 21:44:10
===
D(<0.353.0>:ejabberd_http:322) : ["chat","iJab.html"] matches
["chat"]

=INFO REPORT==== 2012-08-26 21:44:10
===
D(<0.353.0>:mod_http_fileserver:294) : Requested ["iJab.html"]

The
file /var/log/ejabberd/access.log have not created at all. It seems if
fileserver mod did not start at all but obviously it's not the case
since it logs into /var/log/ejabberd/ejabberd.log. 

I verified the
permission of the files in question: 

-rw-r--r-- 1 ejabberd ftpuser
1923 2010-06-10 12:04 Changes
drwxr-xr-x 6 ejabberd ftpuser 4096
2010-08-19 14:58 ijab
-rw-r--r-- 1 ejabberd ftpuser 1851 2012-08-26
21:18 ijab_config.js
-rw-r--r-- 1 ejabberd ftpuser 1332 2010-03-11 00:48
ijab_i18n_en.js
-rw-r--r-- 1 ejabberd ftpuser 3485 2010-04-02 17:42
ijab_i18n_zh.js
-rw-r--r-- 1 ejabberd ftpuser 5757 2010-04-09 15:31
index.html 

The output of ps: 

ejabberd 17075 0.0 0.0 10712 400 ? S
21:42 0:00 /usr/lib/erlang/erts-5.7.4/bin/epmd -daemon
ejabberd 17111
0.0 1.2 92116 50532 ? S 21:42 0:01 /usr/lib/erlang/erts-5.7.4/bin/beam
-K false -P 250000 -- -root /usr/lib/erlang -progname erl -- -home
/var/lib/ejabberd -- -sname ejabberd -pa /usr/lib/ejabberd/ebin -s
ejabberd -kernel inetrc "/etc/ejabberd/inetrc" -ejabberd config
"/etc/ejabberd/ejabberd.cfg" log_path "/var/log/ejabberd/ejabberd.log"
-sasl sasl_error_logger {file,"/var/log/ejabberd/erlang.log"} -mnesia
dir "/var/lib/ejabberd" -smp disable -noshell -noshell -noinput

The
content of the file /var/log/ejabberd/erlang.log: 

=PROGRESS REPORT====
26-Aug-2012::21:42:16 ===
 application: ejabberd
 started_at:
ejabberd at cerebellum 

Thanks, 

six 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120826/ea7ece88/attachment.html>


More information about the ejabberd mailing list