这是我拥有的inets配置文件:
[{port, 443},
{server_name, "example.com"},
{server_root, "./root/"},
{document_root, "./htdocs/"},
{socket_type, {essl, [{certfile, "/etc/letsencrypt/live/example.com/cert.pem"}, {keyfile, "/etc/letsencrypt/live/example.com/privkey.pem"}]}},
{directory_index, ["index.html"]},
{erl_script_alias, {"/erl",[functions]}},
{erl_script_nocache, true},
{script_alias, {"/cgi-bin/", "/home/example/site/cgi-bin/"}},
{script_nocache,true}
].
使用此配置文件,我可以访问:
https://example.com/cgi-bin/something.cgi
and
https://example.com/erl/functions/function
我已经知道将{script_alias, {"/cgi-bin/"...更改为{script_alias, {"/"...可以让我从 访问 cgi 脚本https://example.com/
,但是如何使用erl_script_alias获得相同的行为?例如:访问https://example.com/
和访问/erl/functions/function
?