webtool允许远程访问

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”}]).

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /opt/wordpress/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048