类型

目前使用到的类型有

程序池

{
    "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会重新赋值

IIS站点

以下是一个案例

{
    "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,会进行追加!!!

Systemd(Linux的systemd文件)

这个是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作为根级的时候表示分配给程序/

超级管理员
立即前往参与当前项目管理 类型 内容
贴代码框架
贴代码框架PasteForm的在线文档,主要介绍理念和特性及实际案例!
贴代码文档
什么才叫操作文档?对于操作人员来说,遇到哪个字段不懂意思,点击下即可查阅说明,这就是最好的文档!
PasteSpider在线操作文档
PasteSpider是专门为开发者开发的部署工具,五分钟上手,小内存服务器也可以使用,使用旁载模式,运行更安全!!!目前仅支持linux的服务器,win服务器的版本将在不久到来!
贴代码在线客服文档
是客服系统也是营销系统,支持丰富的话术配置,支持自定义消息格式,支持多站点入驻模式,一键部署快速搭建!