Directory index seems not to work
Ferreira Maurizio
maurizio.ferreira@REDACTED
Thu May 28 11:30:58 CEST 2009
The following program should set directory_index to index.html,
so that a request as http://127.0.0.1 should return such a file, however
it causes an internal server error.
In the error log file I can see:
"httpd_file: Can't opend:/temp/"
A request as http://127.0.0.1/index.html works perfectly.
I'm trying with Erlang R13B, under Windows 2000.
Any suggestion ?
Regards
Maurizio
-module(test).
-export([start/0,stop/0]).
start() ->
inets:start(),
{ok, Pid} = inets:start(httpd,
[ {port, 80},
{server_name,"ferreira-d"},
{server_root,"d:/temp"},
{document_root,"d:/temp"},
{directory_index, ["index.html", "welcome.html"]},
{bind_address, "localhost"},
{log_format, common},
{error_log, "errors.log"},
{transfer_log, "transfer.log"},
{security_log, "security.log"}
]),
httpd:info(Pid) .
stop() ->
inets:stop().
More information about the erlang-questions
mailing list