diff --git a/include/ejabberd_web_admin.hrl b/include/ejabberd_web_admin.hrl index 9700ab0b3..731087054 100644 --- a/include/ejabberd_web_admin.hrl +++ b/include/ejabberd_web_admin.hrl @@ -93,7 +93,7 @@ -define(GL(Ref, Title), ?XAE(<<"div">>, [{<<"class">>, <<"guidelink">>}], [?XAE(<<"a">>, - [{<<"href">>, <<"/admin/doc/guide.html#", Ref/binary>>}, + [{<<"href">>, <<"https://docs.ejabberd.im/admin/configuration/#", Ref/binary>>}, {<<"target">>, <<"_blank">>}], [?C(<<"[Guide: ", Title/binary, "]">>)])])). diff --git a/src/ejabberd_web_admin.erl b/src/ejabberd_web_admin.erl index d16e28206..bc0fc8e7b 100644 --- a/src/ejabberd_web_admin.erl +++ b/src/ejabberd_web_admin.erl @@ -150,30 +150,6 @@ url_to_path(URL) -> str:tokens(URL, <<"/">>). %%%================================== %%%% process/2 -process([<<"doc">>, LocalFile], _Request) -> - DocPath = case os:getenv("EJABBERD_DOC_PATH") of - P when is_list(P) -> P; - false -> <<"/share/doc/ejabberd/">> - end, - FileName = filename:join(DocPath, LocalFile), - case file:read_file(FileName) of - {ok, FileContents} -> - ?DEBUG("Delivering content.", []), - {200, [{<<"Server">>, <<"ejabberd">>}], FileContents}; - {error, Error} -> - Help = <<" ", FileName/binary, - " - Try to specify the path to ejabberd " - "documentation with the environment variable " - "EJABBERD_DOC_PATH. Check the ejabberd " - "Guide for more information.">>, - ?WARNING_MSG("Problem '~p' accessing the local Guide file ~ts", [Error, Help]), - case Error of - eacces -> {403, [], <<"Forbidden", Help/binary>>}; - enoent -> {307, [{<<"Location">>, <<"http://docs.ejabberd.im/admin/guide/configuration/">>}], <<"Not found", Help/binary>>}; - _Else -> - {404, [], <<(iolist_to_binary(atom_to_list(Error)))/binary, Help/binary>>} - end - end; process([<<"server">>, SHost | RPath] = Path, #request{auth = Auth, lang = Lang, host = HostHTTP, method = Method} =