开启一个 https 服务器(一行 json 搞定,全部配置都 ajax post), OPener_Server 第 6 弹

OPener_Server 全部的配置及后续运行所有依托 ajax post json 数据。
不像 nginx 、 apache , OPener_server 没有复杂的配置文件,也没有找不到配置目录的困难。
全部的一切所有一行 json ,而后 ajax post 到 OPener_Server 就能够了。jquery

启动一个 http 服务器,并设定一个根目录nginx

继续 jquery :git

var start_http_server3={'action':'new_http_server','ip':'','port':'1010'}; // 开启一个新的 http 服务器,监听在端口 1010 上
var reg_url={'action':'reg_url','type':'file_root','url':'/*','host':'*:1010','go':'/root'}; 

url_post_data(url,JSON.stringify(start_http_server3)); 
url_post_data(url,JSON.stringify(reg_url));

启动一个 https 服务器,并设定一个可浏览目录github

继续 jquery :ajax

var start_http_server4={'action':'new_https_server','ip':'','port':'1011','cert_file':'opener.pem'}; // 开启一个新的 https 服务器,监听在端口 1011 上,指定证书文件是 opener.pem
var reg_url={'action':'reg_url','type':'file_index','url':'/index','host':'*:1011','go':'/root'}; 

url_post_data(url,JSON.stringify(start_http_server4)); 
url_post_data(url,JSON.stringify(reg_url));

OPener_Server 教程:apache

第 1 弹: https://segmentfault.com/a/11...
第 2 弹: https://segmentfault.com/a/11...
第 3 弹: https://segmentfault.com/a/11...
第 4 弹: https://segmentfault.com/a/11...
第 5 弹: https://segmentfault.com/a/11...json

项目地址: https://github.com/openerserv...segmentfault

微博: http://weibo.com/openerserver服务器

微信公众号:
006897bVjw1f9tqs614rqj309k09kjrc.jpg微信

相关文章
相关标签/搜索