webtool:start().启动后,无法远程访问,查看
start(Path,Data)->{ok,Pid}|{stop,Reason} Types: Path = string() | standard_path Data = [Port,Address,Name] | PortNumber | standard_data Port = {port,PortNumber} Address = {bind_address,IpNumber} Name = {server_name,ServerName} PortNumber = integer() IpNumber = tuple(), e.g. {127,0,0,1} ServerName = string() Pid = pid() Use this function to start WebTool if the default port, ip-number,servername or path can not be used. Path is the directory where the mime.types file and WebTool's own HTML files are located. By default this is webtool-<vsn>/priv, and in most cases there is no need to change this. If Path is set to standard_path the default will be used. If Data is set to PortNumber, the default data will be used for ip-number (127.0.0.1) and server name (localhost).
需要设置bind_address为 0,0,0,0才能远程访问。
启动方式如下:
webtool:start(standard_path,[{port,8888},{bind_address,{0,0,0,0}},{server_name,”server”}]).
近期评论