目前使用到的类型有
{
"name": "iis_temp",
"status": "started",
"auto_start": true,
"pipeline_mode": "integrated",
"managed_runtime_version": "",
"enable_32bit_win64": "false",
"queue_length": 1000,
"start_mode": "AlwaysRunning",
"cpu": {
"limit": "0",
"limit_interval": "4",
"action": "NoAction",
"processor_affinity_enabled": "false",
"processor_affinity_mask32": "0xFFFFFFFF",
"processor_affinity_mask64": "0xFFFFFFFF"
},
"process_model": {
"idle_timeout": "30",
"max_processes": "1",
"pinging_enabled": "true",
"ping_interval": "30",
"ping_response_time": "90",
"shutdown_time_limit": "90",
"startup_time_limit": "90",
"idle_timeout_action": "Terminate"
},
"identity": {
"identity_type": "ApplicationPoolIdentity",
"username": "",
"load_user_profile": "true"
},
"recycling": {
"disable_overlapped_recycle": "false",
"disable_recycle_on_config_change": "false",
"log_events": {
"time": "true",
"requests": "true",
"schedule": "true",
"memory": "true",
"isapi_unhealthy": "true",
"on_demand": "true",
"config_change": "true",
"private_memory": "true"
},
"periodic_restart": {
"time_interval": 1740,
"private_memory": "0",
"request_limit": "0",
"virtual_memory": "0",
"schedule": []
}
},
"rapid_fail_protection": {
"enabled": "true",
"load_balancer_capabilities": "HttpLevel",
"interval": 5,
"max_crashes": 5,
"auto_shutdown_exe": "",
"auto_shutdown_params": ""
},
"process_orphaning": {
"enabled": "false",
"orphan_action_exe": "",
"orphan_action_params": ""
}
}
以上信息中,在创建程序池的时候name会重新赋值
以下是一个案例
{
"name": "iis_temp",
"physical_path": "D:\\spider\\demo\\api\\default\app_11",
"status": "started",
"server_auto_start": true,
"enabled_protocols": "http",
"limits": {
"connection_timeout": 120,
"max_bandwidth": 10000,
"max_connections": 10000,
"max_url_segments": 32
},
"bindings": [
{
"protocol": "http",
"binding_information": "*:11111:",
"ip_address": "*",
"port": "11111",
"hostname": ""
}
],
"application_pool": {
"name": "iis_temp",
"status": "started"
}
}
上面的内容中的name和physical_path在启动的时候会基于系统 计算的重新赋值,也就是不需要配置!
对应的bindings,会进行追加!!!
这个是Linux中的服务,也就是systemd,还是叫systemctl,以下是默认的内容
[Unit]
Description={{Service.RunName}} Service Application
After=network.target
[Service]
ExecStart={{Current.Dir}}/{{Service.RunName}} --urls=http://*:{{App.Port[0]}}
WorkingDirectory={{Current.Dir}}
#User={{Service.UserName}}
#Group={{Service.UserName}}
Restart=always
RestartSec=15
#Environment=DOTNET_ROOT={{Current.Dir}}
[Install]
WantedBy=multi-user.target
EOF
上面中注意{{XXX.YYY}}是PasteSpider中的宏的写法,可以查看宏的文章了解更多宏的写法!
这里的内容支持宏,目前的几个数据类型都是JObject的
也就是大概这个样子
{
"tag":"abc"
}
具体的要看类型,看上面各类型的说明
以下是一个实际案例
{
"app_pools": [
{
"path": "/abc",
"physical_path": "D:\\spider1\\publish\\demo\\api"
}
],
"vir_dirs": [
{
"path": "/bbc",
"physical_path": "D:\\spider1\\publish\\demo\\api"
}
]
}
实际的效果为
注意abc的程序池和当前站点的一致!
其实整个网站是一个程序,也就是实际中站点和上面的abc是同一个东西,不过用的是/目录
所以支持这么写!
app_pools是一个数组,然后里面还可以加一个参数vir_dirs,然后就是对应的path和paysical_path了!
vir_dirs作为根级的时候表示分配给程序/