diff --git a/.hintrc b/.hintrc
new file mode 100644
index 0000000..aa8de6b
--- /dev/null
+++ b/.hintrc
@@ -0,0 +1,5 @@
+{
+ "extends": [
+ "development"
+ ]
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index ce24c46..a9b93a1 100644
--- a/README.md
+++ b/README.md
@@ -116,11 +116,7 @@ paths 配置
"servers":[{
"port" : 8080,
"name":"test",
- "health_check": {
- "interval": "10s", // 每10秒检查一次
- "timeout": "5s", // 每次检查5秒超时
- "retries": 3 // 失败3次才认为是不健康
- },
+
"paths":[{
"path": "/",
"root": "/home/kingecg/code/gohttp/public/",
@@ -133,7 +129,12 @@ paths 配置
"HeaderOrigin",
"Path /ws /",
"RemoveCookie token"
- ]
+ ],
+ "health_check": {
+ "interval": "10s", // 每10秒检查一次
+ "timeout": "5s", // 每次检查5秒超时
+ "retries": 3 // 失败3次才认为是不健康
+ },
}]
}]
}
@@ -158,6 +159,10 @@ paths 配置
- 返回的response中设置header
- 反向代理时,修改发送到上游服务器的请求
+命名规则:
+模块支持的指令,以模块名作为前缀,如:Proxy_Path 是反向代理模块的Path指令。
+没有前缀的,是全局指令,如:Set-Header 是设置header的指令。
+
## Packages
### Server
diff --git a/__debug_bin1861531173 b/__debug_bin1861531173
new file mode 100755
index 0000000..c968f5a
Binary files /dev/null and b/__debug_bin1861531173 differ
diff --git a/admin/admin.go b/admin/admin.go
index a022093..95fdced 100644
--- a/admin/admin.go
+++ b/admin/admin.go
@@ -77,16 +77,53 @@ func getStatus(w http.ResponseWriter, r *http.Request) {
w.Write(server.NewSuccessResult(ret))
}
+func stop(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+ ctxData := ctx.Value(server.RequestCtxKey("data")).(map[string]interface{})
+ name, ok := ctxData["name"]
+ if ok {
+ serverConf := model.GetServerConfig(name.(string))
+ server.StopServer(name.(string), serverConf.Port)
+ w.WriteHeader(http.StatusOK)
+ data := "stopped"
+ w.Write(server.NewSuccessResult(data))
+ return
+ }
+ http.NotFound(w, r)
+}
+
+func start(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+ ctxData := ctx.Value(server.RequestCtxKey("data")).(map[string]interface{})
+ name, ok := ctxData["name"]
+ if ok {
+ serverConf := model.GetServerConfig(name.(string))
+ server.StartServer(name.(string), serverConf.Port)
+ w.WriteHeader(http.StatusOK)
+ data := "started"
+ w.Write(server.NewSuccessResult(data))
+ return
+ }
+}
+
var AdminServerMux *server.RestMux
-func init() {
+func InitAdminApi(conf *model.HttpServerConfig) {
+
AdminServerMux = server.NewRestMux("/api")
- AdminServerMux.Use(server.JwtAuth)
+ if conf.AuthType == "jwt" {
+ AdminServerMux.Use(server.JwtAuth)
+ } else if conf.AuthType == "basic" {
+ AdminServerMux.Use(server.BasicAuth)
+ }
+ // AdminServerMux.Use(server.JwtAuth)
AdminServerMux.HandleFunc("GET", "/about", http.HandlerFunc(about))
postConfigRoute := AdminServerMux.HandleFunc("POST", "/config", http.HandlerFunc(setConfig))
postConfigRoute.Add(server.Parse[model.HttpServerConfig])
AdminServerMux.HandleFunc("GET", "/config/:id", http.HandlerFunc(getServerConfigure))
AdminServerMux.HandleFunc("GET", "/status", http.HandlerFunc(getStatus))
+ AdminServerMux.HandleFunc("Post", "/stop/:name", http.HandlerFunc(stop))
+ AdminServerMux.HandleFunc("Post", "/start/:name", http.HandlerFunc(start))
loginRoute := AdminServerMux.HandleFunc("POST", "/login", http.HandlerFunc(login))
loginRoute.Add(server.Parse[LoginModel])
// AdminServerMux.Use(server.BasicAuth)
diff --git a/config.json b/config.json
index d2f5626..65fbdbc 100644
--- a/config.json
+++ b/config.json
@@ -23,6 +23,7 @@
},
"admin": {
"name": "admin",
+ "server":"admin",
"port": 8088,
"username": "admin",
"password": "admin",
@@ -40,183 +41,15 @@
]
},
"servers": [
-
{
- "port": 3000,
- "name": "cloudops",
-
+ "name": "teststatic",
+ "server":"www.teststatic.com",
+ "port": 8088,
"paths": [
-
- {
- "path": "/static",
- "root": "/home/kingecg/work/angular13/cloudops/static",
- "default": "index.html"
- },
{
"path": "/",
- "upstreams": [
- "http://localhost:4200"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/ssologin",
- "upstreams": [
- "http://localhost:4200"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/themes",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/security",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/relational/assets",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/platform/version",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/patrolrecords",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/standingbook",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/resource",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/config",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/workflow",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/token/check",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/messages",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/cloudops-state/",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/socket.io/",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/v1/stream",
- "upstreams": [
- "http://192.168.12.157:9880"
- ],
- "directives": [
- "HostSchemas $target"
- ]
- },
- {
- "path": "/thing",
- "upstreams": [
- "http://192.168.12.204:1662"
- ],
- "directives": [
- "HostSchemas $target",
- "HeaderOrigin",
- "RemoveCookie token"
- ]
- },
- {
- "path":"/ib",
- "upstreams": [
- "http://localhost:8080"
- ],
- "directives": [
- "HostSchemas $target",
- "HeaderOrigin",
- "RemoveCookie token"
- ]
+ "root": "./example",
+ "default": "index.html"
}
]
}
diff --git a/config.jsonbak b/config.jsonbak
new file mode 100644
index 0000000..d2f5626
--- /dev/null
+++ b/config.jsonbak
@@ -0,0 +1,224 @@
+{
+ "logging": {
+ "appenders": {
+ "out": {
+ "type": "file",
+ "options": {
+ "file": "gohttpd.log"
+ }
+ },
+ "stdout": {
+ "type": "console"
+ }
+ },
+ "categories": {
+ "default": {
+ "appenders": [
+ "out",
+ "stdout"
+ ],
+ "level": "debug"
+ }
+ }
+ },
+ "admin": {
+ "name": "admin",
+ "port": 8088,
+ "username": "admin",
+ "password": "admin",
+ "directives": [
+ "Set-Header Access-Control-Allow-Origin *",
+ "Set-Header Access-Control-Allow-Methods GET, POST, PUT, DELETE, OPTIONS",
+ "Set-Header Access-Control-Allow-Headers Content-Type, Authorization, Content-Length, X-Requested-With"
+ ],
+ "paths": [
+ {
+ "path": "/",
+ "root": "./adminui",
+ "default": "index.html"
+ }
+ ]
+ },
+ "servers": [
+
+ {
+ "port": 3000,
+ "name": "cloudops",
+
+ "paths": [
+
+ {
+ "path": "/static",
+ "root": "/home/kingecg/work/angular13/cloudops/static",
+ "default": "index.html"
+ },
+ {
+ "path": "/",
+ "upstreams": [
+ "http://localhost:4200"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/ssologin",
+ "upstreams": [
+ "http://localhost:4200"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/themes",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/security",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/relational/assets",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/platform/version",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/patrolrecords",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/standingbook",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/resource",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/config",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/workflow",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/token/check",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/messages",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/cloudops-state/",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/socket.io/",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/v1/stream",
+ "upstreams": [
+ "http://192.168.12.157:9880"
+ ],
+ "directives": [
+ "HostSchemas $target"
+ ]
+ },
+ {
+ "path": "/thing",
+ "upstreams": [
+ "http://192.168.12.204:1662"
+ ],
+ "directives": [
+ "HostSchemas $target",
+ "HeaderOrigin",
+ "RemoveCookie token"
+ ]
+ },
+ {
+ "path":"/ib",
+ "upstreams": [
+ "http://localhost:8080"
+ ],
+ "directives": [
+ "HostSchemas $target",
+ "HeaderOrigin",
+ "RemoveCookie token"
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/example/index.html b/example/index.html
new file mode 100644
index 0000000..7ae9ff1
--- /dev/null
+++ b/example/index.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+ Hello World!
+ Welcome to my website.
+
+
\ No newline at end of file
diff --git a/gohttp.go b/gohttp.go
index edd3450..6c21346 100644
--- a/gohttp.go
+++ b/gohttp.go
@@ -32,7 +32,8 @@ func (g *GoHttp) Start() {
// 设置管理员处理器并使用管理员服务配置
adminHandler := server.NewServeMux(conf.Admin)
- adminHandler.Handle("/api/", http.StripPrefix("/api", admin.AdminServerMux))
+ admin.InitAdminApi(conf.Admin)
+ adminHandler.Handle("/api/", http.StripPrefix("/api", admin.AdminServerMux), []string{})
// 创建并启动管理员服务器
g.makeServer(conf.Admin, adminHandler)
diff --git a/gohttpd.log b/gohttpd.log
index b6fe96a..464e606 100644
--- a/gohttpd.log
+++ b/gohttpd.log
@@ -13402,3 +13402,1530 @@
[2025-02-21 00:48:18] Route : debug - method not match
[2025-02-21 00:48:18] Route : debug - matching route: POST /login with POST /config
[2025-02-21 00:48:18] Route : debug - matching route: POST /login with POST /login
+[2025-05-30 10:40:24] Server : info - Load config success
+[2025-05-30 10:40:24] Server : info - start gohttpd
+[2025-05-30 10:40:24] ServerMux : debug - NewServeMux
+[2025-05-30 10:40:24] ServerMux : debug - add directive: Record-Access
+[2025-05-30 10:40:24] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:40:24] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:40:24] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:40:24] ServerMux : debug - NewServeMux
+[2025-05-30 10:40:24] ServerMux : debug - add directive: Record-Access
+[2025-05-30 10:40:24] Listener : debug - listen on :8088
+[2025-05-30 10:40:24] Listener : debug - listen on :3000
+[2025-05-30 10:40:24] Server : info - gohttpd start success
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://localhost:8080: Get "http://localhost:8080/health": dial tcp [::1]:8080: connect: connection refused
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.204:1662:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:24] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://localhost:8080: Get "http://localhost:8080/health": dial tcp [::1]:8080: connect: connection refused
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.204:1662:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:29] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://localhost:8080: Get "http://localhost:8080/health": dial tcp [::1]:8080: connect: connection refused
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.204:1662:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:34] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.204:1662
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://localhost:8080
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://localhost:4200
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://localhost:4200
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:39] healthcheck : error - All health checks failed for http://192.168.12.157:9880
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://localhost:8080: Get "http://localhost:8080/health": dial tcp [::1]:8080: connect: connection refused
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://localhost:4200: Get "http://localhost:4200/health": dial tcp [::1]:4200: connect: connection refused
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.204:1662:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:40:49] healthcheck : warn - Health check failed for http://192.168.12.157:9880:
+[2025-05-30 10:42:04] Server : info - Load config success
+[2025-05-30 10:42:04] Server : info - start gohttpd
+[2025-05-30 10:42:04] ServerMux : debug - NewServeMux
+[2025-05-30 10:42:04] ServerMux : debug - add directive: Record-Access
+[2025-05-30 10:42:04] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:42:04] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:42:04] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:42:04] Listener : debug - listen on :8088
+[2025-05-30 10:42:04] Server : info - gohttpd start success
+[2025-05-30 10:56:01] Server : info - Load config success
+[2025-05-30 10:56:01] Server : info - start gohttpd
+[2025-05-30 10:56:01] ServerMux : debug - NewServeMux
+[2025-05-30 10:56:01] ServerMux : debug - add directive: Record-Access
+[2025-05-30 10:56:01] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:56:01] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:56:01] ServerMux : debug - add directive: Set-Header
+[2025-05-30 10:56:01] ServerMux : debug - NewServeMux
+[2025-05-30 10:56:01] ServerMux : debug - add directive: Record-Access
+[2025-05-30 10:56:01] Listener : debug - listen on :8089
+[2025-05-30 10:56:01] Listener : debug - listen on :8088
+[2025-05-30 10:56:01] Server : info - gohttpd start success
+[2025-05-30 10:56:18] Access : info - From 127.0.0.1:53998-GET /
+[2025-05-30 10:56:18] Access : info - match path: /
+[2025-05-30 10:56:18] Directive : debug - Record-Access
+[2025-05-30 10:56:18] filehandler : debug - access:/
+[2025-05-30 10:56:18] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 10:56:18] filehandler : debug - access:/index.html
+[2025-05-30 10:56:18] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 10:56:18] Access : info - From 127.0.0.1:53998-GET /favicon.ico
+[2025-05-30 10:56:18] Access : info - match path: /
+[2025-05-30 10:56:18] Directive : debug - Record-Access
+[2025-05-30 10:56:18] filehandler : debug - access:/favicon.ico
+[2025-05-30 10:56:18] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/favicon.ico
+[2025-05-30 10:56:18] filehandler : error - access file error:/persistent/home/kingecg/work/code/gohttp/example/favicon.icostat /persistent/home/kingecg/work/code/gohttp/example/favicon.ico: no such file or directory
+[2025-05-30 10:57:56] Access : info - From [::1]:50194-GET /status
+[2025-05-30 10:57:56] Access : info - match path: /
+[2025-05-30 10:57:56] Directive : debug - Record-Access
+[2025-05-30 10:57:56] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 10:57:56] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 10:57:56] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 10:57:56] filehandler : debug - access:/status
+[2025-05-30 10:57:56] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/status
+[2025-05-30 10:57:56] filehandler : error - access file error:/persistent/home/kingecg/work/code/gohttp/adminui/statusstat /persistent/home/kingecg/work/code/gohttp/adminui/status: no such file or directory
+[2025-05-30 10:58:08] Access : info - From [::1]:50194-GET /api/status
+[2025-05-30 10:58:08] Access : info - match path: /api/
+[2025-05-30 10:58:08] Directive : debug - Record-Access
+[2025-05-30 10:58:08] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 10:58:08] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 10:58:08] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:22:52] Server : info - Load config success
+[2025-05-30 14:22:52] Server : info - start gohttpd
+[2025-05-30 14:22:52] ServerMux : debug - NewServeMux
+[2025-05-30 14:22:52] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:22:52] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:22:52] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:22:52] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:22:52] ServerMux : debug - NewServeMux
+[2025-05-30 14:22:52] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:22:52] Listener : debug - listen on :8088
+[2025-05-30 14:22:52] Listener : debug - listen on :8089
+[2025-05-30 14:22:52] Server : info - gohttpd start success
+[2025-05-30 14:23:00] Access : info - From [::1]:57362-GET /api/status
+[2025-05-30 14:23:00] Access : info - match path: /api/
+[2025-05-30 14:23:00] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:23:00] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:23:00] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:23:00] Directive : debug - Record-Access
+[2025-05-30 14:23:00] Route : debug - matching route: GET /status with GET /config/:id
+[2025-05-30 14:23:00] URLMatcher : debug - Match for /status
+[2025-05-30 14:23:00] Route : debug - Not match matcher reg
+[2025-05-30 14:23:00] Route : debug - matching route: GET /status with GET /about
+[2025-05-30 14:23:00] Route : debug - matching route: GET /status with POST /config
+[2025-05-30 14:23:00] Route : debug - method not match
+[2025-05-30 14:23:00] Route : debug - matching route: GET /status with POST /login
+[2025-05-30 14:23:00] Route : debug - method not match
+[2025-05-30 14:23:00] Route : debug - matching route: GET /status with GET /status
+[2025-05-30 14:25:05] Server : info - Load config success
+[2025-05-30 14:25:05] Server : info - start gohttpd
+[2025-05-30 14:25:05] ServerMux : debug - NewServeMux
+[2025-05-30 14:25:05] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:25:05] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:25:05] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:25:05] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:25:05] ServerMux : debug - NewServeMux
+[2025-05-30 14:25:05] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:25:05] Listener : debug - listen on :8088
+[2025-05-30 14:25:05] Listener : debug - listen on :8089
+[2025-05-30 14:25:05] Server : info - gohttpd start success
+[2025-05-30 14:25:13] Access : info - From [::1]:37916-GET /api/stop
+[2025-05-30 14:25:13] Access : info - match path: /api/
+[2025-05-30 14:25:13] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:25:13] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:25:13] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:25:13] Directive : debug - Record-Access
+[2025-05-30 14:25:13] Route : debug - matching route: GET /stop with GET /config/:id
+[2025-05-30 14:25:13] URLMatcher : debug - Match for /stop
+[2025-05-30 14:25:13] Route : debug - Not match matcher reg
+[2025-05-30 14:25:13] Route : debug - matching route: GET /stop with Post /stop/:name
+[2025-05-30 14:25:13] Route : debug - method not match
+[2025-05-30 14:25:13] Route : debug - matching route: GET /stop with GET /about
+[2025-05-30 14:25:13] Route : debug - matching route: GET /stop with POST /config
+[2025-05-30 14:25:13] Route : debug - method not match
+[2025-05-30 14:25:13] Route : debug - matching route: GET /stop with POST /login
+[2025-05-30 14:25:13] Route : debug - method not match
+[2025-05-30 14:25:13] Route : debug - matching route: GET /stop with GET /status
+[2025-05-30 14:25:29] Access : info - From [::1]:37916-POST /api/stop
+[2025-05-30 14:25:29] Access : info - match path: /api/
+[2025-05-30 14:25:29] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:25:29] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:25:29] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:25:29] Directive : debug - Record-Access
+[2025-05-30 14:25:29] Route : debug - matching route: POST /stop with GET /config/:id
+[2025-05-30 14:25:29] Route : debug - method not match
+[2025-05-30 14:25:29] Route : debug - matching route: POST /stop with Post /stop/:name
+[2025-05-30 14:25:29] Route : debug - method not match
+[2025-05-30 14:25:29] Route : debug - matching route: POST /stop with GET /about
+[2025-05-30 14:25:29] Route : debug - method not match
+[2025-05-30 14:25:29] Route : debug - matching route: POST /stop with POST /config
+[2025-05-30 14:25:29] Route : debug - matching route: POST /stop with POST /login
+[2025-05-30 14:25:29] Route : debug - matching route: POST /stop with GET /status
+[2025-05-30 14:25:29] Route : debug - method not match
+[2025-05-30 14:28:12] Access : info - From [::1]:37916-POST /api/stop
+[2025-05-30 14:28:12] Access : info - match path: /api/
+[2025-05-30 14:28:12] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:28:12] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:28:12] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:28:12] Directive : debug - Record-Access
+[2025-05-30 14:28:20] Route : debug - matching route: POST /stop with GET /config/:id
+[2025-05-30 14:28:20] Route : debug - method not match
+[2025-05-30 14:28:30] Route : debug - matching route: POST /stop with Post /stop/:name
+[2025-05-30 14:30:16] Server : info - Load config success
+[2025-05-30 14:30:16] Server : info - start gohttpd
+[2025-05-30 14:30:16] ServerMux : debug - NewServeMux
+[2025-05-30 14:30:16] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:30:16] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:30:16] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:30:16] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:30:16] ServerMux : debug - NewServeMux
+[2025-05-30 14:30:16] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:30:16] Listener : debug - listen on :8088
+[2025-05-30 14:30:16] Listener : debug - listen on :8089
+[2025-05-30 14:30:16] Server : info - gohttpd start success
+[2025-05-30 14:30:19] Access : info - From [::1]:42350-POST /api/stop
+[2025-05-30 14:30:19] Access : info - match path: /api/
+[2025-05-30 14:30:19] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:30:19] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:30:19] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:30:19] Directive : debug - Record-Access
+[2025-05-30 14:30:22] Route : debug - matching route: POST /stop with GET /config/:id
+[2025-05-30 14:30:22] Route : debug - method not match
+[2025-05-30 14:30:23] Route : debug - matching route: POST /stop with Post /stop/:name
+[2025-05-30 14:30:23] URLMatcher : debug - Match for /stop
+[2025-05-30 14:30:23] Route : debug - Not match matcher reg
+[2025-05-30 14:30:24] Route : debug - matching route: POST /stop with GET /about
+[2025-05-30 14:30:24] Route : debug - method not match
+[2025-05-30 14:30:25] Route : debug - matching route: POST /stop with POST /config
+[2025-05-30 14:30:25] Route : debug - matching route: POST /stop with POST /login
+[2025-05-30 14:30:26] Route : debug - matching route: POST /stop with GET /status
+[2025-05-30 14:30:26] Route : debug - method not match
+[2025-05-30 14:31:07] Access : info - From [::1]:42350-POST /api/stop/teststatic
+[2025-05-30 14:31:07] Access : info - match path: /api/
+[2025-05-30 14:31:07] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:31:07] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:31:07] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:31:07] Directive : debug - Record-Access
+[2025-05-30 14:31:10] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 14:31:10] Route : debug - method not match
+[2025-05-30 14:31:13] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 14:31:13] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 14:31:13] ServerListener : error - Start server error:teststatichttp: Server closed
+[2025-05-30 14:31:13] ServerListener : info - Start server success:teststatic
+[2025-05-30 14:38:36] Server : info - Load config success
+[2025-05-30 14:38:36] Server : info - start gohttpd
+[2025-05-30 14:38:36] ServerMux : debug - NewServeMux
+[2025-05-30 14:38:36] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:38:36] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:38:36] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:38:36] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:38:36] ServerMux : debug - NewServeMux
+[2025-05-30 14:38:36] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:38:36] Listener : debug - listen on :8088
+[2025-05-30 14:38:36] Listener : debug - listen on :8089
+[2025-05-30 14:38:36] Server : info - gohttpd start success
+[2025-05-30 14:54:13] Server : info - Load config success
+[2025-05-30 14:54:13] Server : info - start gohttpd
+[2025-05-30 14:54:13] ServerMux : debug - NewServeMux
+[2025-05-30 14:54:13] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:54:13] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:54:13] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:54:13] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:54:13] ServerMux : debug - NewServeMux
+[2025-05-30 14:54:13] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:54:20] Listener : debug - listen on :8088
+[2025-05-30 14:54:20] Listener : debug - listen on :8089
+[2025-05-30 14:54:20] Server : info - gohttpd start success
+[2025-05-30 14:54:23] Access : info - From 127.0.0.1:43232-GET /
+[2025-05-30 14:54:23] Access : info - match path: /
+[2025-05-30 14:54:23] Directive : debug - Record-Access
+[2025-05-30 14:54:23] filehandler : debug - access:/
+[2025-05-30 14:54:23] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 14:54:23] filehandler : debug - access:/index.html
+[2025-05-30 14:54:23] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 14:54:23] Access : info - From 127.0.0.1:43232-GET /favicon.ico
+[2025-05-30 14:54:23] Access : info - match path: /
+[2025-05-30 14:54:23] Directive : debug - Record-Access
+[2025-05-30 14:54:23] filehandler : debug - access:/favicon.ico
+[2025-05-30 14:54:23] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/favicon.ico
+[2025-05-30 14:54:23] filehandler : error - access file error:/persistent/home/kingecg/work/code/gohttp/example/favicon.icostat /persistent/home/kingecg/work/code/gohttp/example/favicon.ico: no such file or directory
+[2025-05-30 14:54:29] Access : info - From [::1]:42112-POST /api/stop/teststatic
+[2025-05-30 14:54:29] Access : info - match path: /api/
+[2025-05-30 14:54:29] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:54:29] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:54:29] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:54:29] Directive : debug - Record-Access
+[2025-05-30 14:54:29] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 14:54:29] Route : debug - method not match
+[2025-05-30 14:54:29] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 14:54:29] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 14:54:29] Route : debug - Not match matcher reg
+[2025-05-30 14:54:29] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 14:54:29] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 14:54:29] ServerListener : info - Server stopped:teststatic
+[2025-05-30 14:54:42] Access : info - From [::1]:42112-POST /api/start/teststatic
+[2025-05-30 14:54:42] Access : info - match path: /api/
+[2025-05-30 14:54:42] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:54:42] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:54:42] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:54:42] Directive : debug - Record-Access
+[2025-05-30 14:54:42] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 14:54:42] Route : debug - method not match
+[2025-05-30 14:54:42] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 14:54:42] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 14:54:42] ServerListener : info - Server stopped:teststatic
+[2025-05-30 14:56:05] Access : info - From [::1]:42112-POST /api/start/teststatic
+[2025-05-30 14:56:05] Access : info - match path: /api/
+[2025-05-30 14:56:05] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:56:05] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:56:05] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:56:05] Directive : debug - Record-Access
+[2025-05-30 14:56:05] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 14:56:05] Route : debug - method not match
+[2025-05-30 14:56:05] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 14:56:05] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 14:56:29] ServerListener : info - Server stopped:teststatic
+[2025-05-30 14:59:15] Server : info - Load config success
+[2025-05-30 14:59:15] Server : info - start gohttpd
+[2025-05-30 14:59:15] ServerMux : debug - NewServeMux
+[2025-05-30 14:59:15] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:59:15] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:59:15] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:59:15] ServerMux : debug - add directive: Set-Header
+[2025-05-30 14:59:15] ServerMux : debug - NewServeMux
+[2025-05-30 14:59:15] ServerMux : debug - add directive: Record-Access
+[2025-05-30 14:59:15] Listener : debug - listen on :8088
+[2025-05-30 14:59:15] Listener : debug - listen on :8089
+[2025-05-30 14:59:15] Server : info - gohttpd start success
+[2025-05-30 14:59:24] Access : info - From [::1]:55836-POST /api/stop/teststatic
+[2025-05-30 14:59:24] Access : info - match path: /api/
+[2025-05-30 14:59:24] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:59:24] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:59:24] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:59:24] Directive : debug - Record-Access
+[2025-05-30 14:59:24] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 14:59:24] Route : debug - method not match
+[2025-05-30 14:59:24] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 14:59:24] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 14:59:24] Route : debug - Not match matcher reg
+[2025-05-30 14:59:24] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 14:59:24] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 14:59:24] ServerListener : error - Server error:http: Server closed
+[2025-05-30 14:59:24] ServerListener : info - Server stopped:teststatic
+[2025-05-30 14:59:33] Access : info - From [::1]:55836-POST /api/start/teststatic
+[2025-05-30 14:59:33] Access : info - match path: /api/
+[2025-05-30 14:59:33] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 14:59:33] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 14:59:33] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 14:59:33] Directive : debug - Record-Access
+[2025-05-30 14:59:33] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 14:59:33] Route : debug - method not match
+[2025-05-30 14:59:33] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 14:59:33] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 14:59:36] ServerListener : error - Server error:http: Server closed
+[2025-05-30 14:59:36] ServerListener : info - Server stopped:teststatic
+[2025-05-30 15:14:45] Server : info - Load config success
+[2025-05-30 15:14:45] Server : info - start gohttpd
+[2025-05-30 15:14:45] ServerMux : debug - NewServeMux
+[2025-05-30 15:14:45] ServerMux : debug - add directive: Record-Access
+[2025-05-30 15:14:45] ServerMux : debug - add directive: Set-Header
+[2025-05-30 15:14:45] ServerMux : debug - add directive: Set-Header
+[2025-05-30 15:14:45] ServerMux : debug - add directive: Set-Header
+[2025-05-30 15:14:45] ServerMux : debug - NewServeMux
+[2025-05-30 15:14:45] ServerMux : debug - add directive: Record-Access
+[2025-05-30 15:14:45] Listener : debug - listen on :8089
+[2025-05-30 15:14:45] Listener : debug - listen on :8088
+[2025-05-30 15:14:45] Server : info - gohttpd start success
+[2025-05-30 15:15:01] Access : info - From [::1]:48510-GET /api/stop/teststatic
+[2025-05-30 15:15:01] Access : info - match path: /api/
+[2025-05-30 15:15:01] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 15:15:01] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 15:15:01] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 15:15:01] Directive : debug - Record-Access
+[2025-05-30 15:15:01] Route : debug - matching route: GET /stop/teststatic with GET /config/:id
+[2025-05-30 15:15:01] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 15:15:01] Route : debug - Not match matcher reg
+[2025-05-30 15:15:01] Route : debug - matching route: GET /stop/teststatic with Post /start/:name
+[2025-05-30 15:15:01] Route : debug - method not match
+[2025-05-30 15:15:01] Route : debug - matching route: GET /stop/teststatic with Post /stop/:name
+[2025-05-30 15:15:01] Route : debug - method not match
+[2025-05-30 15:15:01] Route : debug - matching route: GET /stop/teststatic with GET /about
+[2025-05-30 15:15:01] Route : debug - matching route: GET /stop/teststatic with POST /config
+[2025-05-30 15:15:01] Route : debug - method not match
+[2025-05-30 15:15:01] Route : debug - matching route: GET /stop/teststatic with POST /login
+[2025-05-30 15:15:01] Route : debug - method not match
+[2025-05-30 15:15:01] Route : debug - matching route: GET /stop/teststatic with GET /status
+[2025-05-30 15:15:21] Access : info - From 127.0.0.1:39290-GET /
+[2025-05-30 15:15:21] Access : info - match path: /
+[2025-05-30 15:15:21] Directive : debug - Record-Access
+[2025-05-30 15:15:21] filehandler : debug - access:/
+[2025-05-30 15:15:21] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 15:15:21] filehandler : debug - access:/index.html
+[2025-05-30 15:15:21] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 15:15:21] Access : info - From 127.0.0.1:39290-GET /favicon.ico
+[2025-05-30 15:15:21] Access : info - match path: /
+[2025-05-30 15:15:21] Directive : debug - Record-Access
+[2025-05-30 15:15:21] filehandler : debug - access:/favicon.ico
+[2025-05-30 15:15:21] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/favicon.ico
+[2025-05-30 15:15:21] filehandler : error - access file error:/persistent/home/kingecg/work/code/gohttp/example/favicon.icostat /persistent/home/kingecg/work/code/gohttp/example/favicon.ico: no such file or directory
+[2025-05-30 15:15:35] Access : info - From [::1]:48510-POST /api/stop/teststatic
+[2025-05-30 15:15:35] Access : info - match path: /api/
+[2025-05-30 15:15:35] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 15:15:35] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 15:15:35] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 15:15:35] Directive : debug - Record-Access
+[2025-05-30 15:15:35] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 15:15:35] Route : debug - method not match
+[2025-05-30 15:15:35] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 15:15:35] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 15:15:35] Route : debug - Not match matcher reg
+[2025-05-30 15:15:35] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 15:15:35] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 15:15:35] ServerListener : info - Server stopped:teststatic
+[2025-05-30 15:15:41] Access : info - From [::1]:48510-POST /api/start/teststatic
+[2025-05-30 15:15:41] Access : info - match path: /api/
+[2025-05-30 15:15:41] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 15:15:41] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 15:15:41] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 15:15:41] Directive : debug - Record-Access
+[2025-05-30 15:15:41] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 15:15:41] Route : debug - method not match
+[2025-05-30 15:15:41] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 15:15:41] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 15:16:33] Access : info - From [::1]:48510-POST /api/start/teststatic
+[2025-05-30 15:16:33] Access : info - match path: /api/
+[2025-05-30 15:16:33] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 15:16:33] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 15:16:33] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 15:16:33] Directive : debug - Record-Access
+[2025-05-30 15:16:33] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 15:16:33] Route : debug - method not match
+[2025-05-30 15:16:33] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 15:16:33] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 15:46:23] Server : info - Load config success
+[2025-05-30 15:46:23] Server : info - start gohttpd
+[2025-05-30 15:46:23] ServerMux : debug - NewServeMux
+[2025-05-30 15:46:23] ServerMux : debug - add directive: Record-Access
+[2025-05-30 15:46:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 15:46:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 15:46:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 15:46:23] ServerMux : debug - NewServeMux
+[2025-05-30 15:46:23] ServerMux : debug - add directive: Record-Access
+[2025-05-30 15:46:23] Listener : debug - listen on :8088
+[2025-05-30 15:46:23] Listener : debug - listen on :8089
+[2025-05-30 15:46:23] Server : info - gohttpd start success
+[2025-05-30 16:00:39] Server : info - Load config success
+[2025-05-30 16:00:39] Server : info - start gohttpd
+[2025-05-30 16:00:39] ServerMux : debug - NewServeMux
+[2025-05-30 16:00:39] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:00:39] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:00:39] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:00:39] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:00:39] ServerMux : debug - NewServeMux
+[2025-05-30 16:00:39] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:00:39] Listener : debug - listen on :8088
+[2025-05-30 16:00:39] Server : info - gohttpd start success
+[2025-05-30 16:01:29] Server : info - Load config success
+[2025-05-30 16:01:29] Server : info - start gohttpd
+[2025-05-30 16:01:29] ServerMux : debug - NewServeMux
+[2025-05-30 16:01:29] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:01:29] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:01:29] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:01:29] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:01:29] ServerMux : debug - NewServeMux
+[2025-05-30 16:01:29] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:01:29] Listener : debug - listen on :8088
+[2025-05-30 16:01:29] Server : info - gohttpd start success
+[2025-05-30 16:02:30] Server : info - Load config success
+[2025-05-30 16:02:30] Server : info - start gohttpd
+[2025-05-30 16:02:30] ServerMux : debug - NewServeMux
+[2025-05-30 16:02:30] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:02:30] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:02:30] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:02:30] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:02:30] ServerMux : debug - NewServeMux
+[2025-05-30 16:02:30] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:02:30] Listener : debug - listen on :8088
+[2025-05-30 16:02:30] Server : info - gohttpd start success
+[2025-05-30 16:04:39] Server : info - Load config success
+[2025-05-30 16:04:39] Server : info - start gohttpd
+[2025-05-30 16:04:39] ServerMux : debug - NewServeMux
+[2025-05-30 16:04:39] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:04:39] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:04:39] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:04:39] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:04:39] ServerMux : debug - NewServeMux
+[2025-05-30 16:04:39] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:04:39] Listener : debug - listen on :8088
+[2025-05-30 16:04:39] Server : info - gohttpd start success
+[2025-05-30 16:04:54] Access : info - From 127.0.0.1:54998-GET /
+[2025-05-30 16:04:54] Access : info - match path: /
+[2025-05-30 16:04:54] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:04:54] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:04:54] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:04:54] Directive : debug - Record-Access
+[2025-05-30 16:04:54] filehandler : debug - access:/
+[2025-05-30 16:04:54] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:04:54] filehandler : debug - access:/index.html
+[2025-05-30 16:04:54] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:04:54] Access : info - From 127.0.0.1:54998-GET /favicon.ico
+[2025-05-30 16:04:54] Access : info - match path: /
+[2025-05-30 16:04:54] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:04:54] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:04:54] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:04:54] Directive : debug - Record-Access
+[2025-05-30 16:04:54] filehandler : debug - access:/favicon.ico
+[2025-05-30 16:04:54] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/favicon.ico
+[2025-05-30 16:04:54] filehandler : error - access file error:/persistent/home/kingecg/work/code/gohttp/adminui/favicon.icostat /persistent/home/kingecg/work/code/gohttp/adminui/favicon.ico: no such file or directory
+[2025-05-30 16:05:49] Server : info - Load config success
+[2025-05-30 16:05:49] Server : info - start gohttpd
+[2025-05-30 16:05:49] ServerMux : debug - NewServeMux
+[2025-05-30 16:05:49] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:05:49] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:05:49] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:05:49] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:05:49] ServerMux : debug - NewServeMux
+[2025-05-30 16:05:49] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:05:49] Listener : debug - listen on :8088
+[2025-05-30 16:05:49] Server : info - gohttpd start success
+[2025-05-30 16:05:56] Access : info - From 127.0.0.1:57748-GET /
+[2025-05-30 16:05:56] Access : info - match path: /
+[2025-05-30 16:05:56] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:05:56] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:05:56] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:05:56] Directive : debug - Record-Access
+[2025-05-30 16:05:56] filehandler : debug - access:/
+[2025-05-30 16:05:56] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:05:56] filehandler : debug - access:/index.html
+[2025-05-30 16:05:56] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:06:08] Access : info - From 127.0.0.1:57748-GET /
+[2025-05-30 16:06:08] Access : info - match path: /
+[2025-05-30 16:06:08] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:06:08] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:06:08] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:06:08] Directive : debug - Record-Access
+[2025-05-30 16:06:08] filehandler : debug - access:/
+[2025-05-30 16:06:08] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:06:08] filehandler : debug - access:/index.html
+[2025-05-30 16:06:08] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:06:10] Access : info - From 127.0.0.1:57748-GET /
+[2025-05-30 16:06:10] Access : info - match path: /
+[2025-05-30 16:06:10] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:06:10] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:06:10] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:06:10] Directive : debug - Record-Access
+[2025-05-30 16:06:10] filehandler : debug - access:/
+[2025-05-30 16:06:10] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:06:10] filehandler : debug - access:/index.html
+[2025-05-30 16:06:10] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:06:34] Server : info - Load config success
+[2025-05-30 16:06:34] Server : info - start gohttpd
+[2025-05-30 16:06:34] ServerMux : debug - NewServeMux
+[2025-05-30 16:06:34] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:06:34] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:06:34] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:06:34] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:06:34] ServerMux : debug - NewServeMux
+[2025-05-30 16:06:34] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:06:34] Listener : debug - listen on :8088
+[2025-05-30 16:06:34] Server : info - gohttpd start success
+[2025-05-30 16:07:15] Access : info - From 127.0.0.1:33104-GET /
+[2025-05-30 16:07:15] Access : info - match path: /
+[2025-05-30 16:07:15] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:07:15] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:07:15] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:07:15] Directive : debug - Record-Access
+[2025-05-30 16:07:15] filehandler : debug - access:/
+[2025-05-30 16:07:15] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:07:15] filehandler : debug - access:/index.html
+[2025-05-30 16:07:15] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:08:01] Access : info - From 127.0.0.1:38054-GET /
+[2025-05-30 16:08:01] Access : info - match path: /
+[2025-05-30 16:08:01] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:08:01] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:08:01] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:08:01] Directive : debug - Record-Access
+[2025-05-30 16:08:01] filehandler : debug - access:/
+[2025-05-30 16:08:01] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:08:01] filehandler : debug - access:/index.html
+[2025-05-30 16:08:01] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:08:34] Server : info - Load config success
+[2025-05-30 16:08:34] Server : info - start gohttpd
+[2025-05-30 16:08:34] ServerMux : debug - NewServeMux
+[2025-05-30 16:08:34] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:08:34] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:08:34] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:08:34] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:08:34] ServerMux : debug - NewServeMux
+[2025-05-30 16:08:34] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:08:34] Listener : debug - listen on :8088
+[2025-05-30 16:08:34] Server : info - gohttpd start success
+[2025-05-30 16:08:41] Access : info - From 127.0.0.1:59190-GET /
+[2025-05-30 16:08:41] Access : info - match path: /
+[2025-05-30 16:08:41] Directive : debug - Record-Access
+[2025-05-30 16:08:41] filehandler : debug - access:/
+[2025-05-30 16:08:41] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 16:08:41] filehandler : debug - access:/index.html
+[2025-05-30 16:08:41] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 16:09:13] Access : info - From 127.0.0.1:59190-GET /
+[2025-05-30 16:09:13] Access : info - match path: /
+[2025-05-30 16:09:13] Directive : debug - Record-Access
+[2025-05-30 16:09:13] filehandler : debug - access:/
+[2025-05-30 16:09:13] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 16:09:13] filehandler : debug - access:/index.html
+[2025-05-30 16:09:13] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 16:09:24] Access : info - From 127.0.0.1:59190-GET /
+[2025-05-30 16:09:24] Access : info - match path: /
+[2025-05-30 16:09:24] Directive : debug - Record-Access
+[2025-05-30 16:09:24] filehandler : debug - access:/
+[2025-05-30 16:09:24] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 16:09:24] filehandler : debug - access:/index.html
+[2025-05-30 16:09:24] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 16:12:37] Access : info - From 127.0.0.1:57858-POST /api/stop/teststatic
+[2025-05-30 16:12:37] Access : info - match path: /api/
+[2025-05-30 16:12:37] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:12:37] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:12:37] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:12:37] Directive : debug - Record-Access
+[2025-05-30 16:12:37] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:12:37] Route : debug - method not match
+[2025-05-30 16:12:37] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:12:37] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:12:37] Route : debug - Not match matcher reg
+[2025-05-30 16:12:37] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:12:37] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:12:40] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:12:40] ServerListener : error - Server error:mux: server closed
+[2025-05-30 16:12:40] ServerListener : info - Server stopped:admin
+[2025-05-30 16:13:06] Access : info - From 127.0.0.1:57858-POST /api/start/teststatic
+[2025-05-30 16:13:06] Access : info - match path: /api/
+[2025-05-30 16:13:06] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:13:06] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:13:06] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:13:06] Directive : debug - Record-Access
+[2025-05-30 16:13:06] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 16:13:06] Route : debug - method not match
+[2025-05-30 16:13:06] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 16:13:06] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 16:13:53] Access : info - From 127.0.0.1:57858-POST /api/start/teststatic
+[2025-05-30 16:13:53] Access : info - match path: /api/
+[2025-05-30 16:13:53] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:13:53] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:13:53] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:13:53] Directive : debug - Record-Access
+[2025-05-30 16:13:53] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 16:13:53] Route : debug - method not match
+[2025-05-30 16:13:53] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 16:13:53] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 16:14:37] Access : info - From 127.0.0.1:57858-POST /api/start/teststatic
+[2025-05-30 16:14:37] Access : info - match path: /api/
+[2025-05-30 16:14:37] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:14:37] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:14:37] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:14:37] Directive : debug - Record-Access
+[2025-05-30 16:14:37] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 16:14:37] Route : debug - method not match
+[2025-05-30 16:14:37] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 16:14:37] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 16:14:49] Access : info - From 127.0.0.1:57858-POST /api/start/teststatic
+[2025-05-30 16:14:49] Access : info - match path: /api/
+[2025-05-30 16:14:49] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:14:49] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:14:49] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:14:49] Directive : debug - Record-Access
+[2025-05-30 16:14:49] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 16:14:49] Route : debug - method not match
+[2025-05-30 16:14:49] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 16:14:49] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 16:15:33] Access : info - From 127.0.0.1:57858-POST /api/status
+[2025-05-30 16:15:33] Access : info - match path: /api/
+[2025-05-30 16:15:33] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:15:33] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:15:33] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:15:33] Directive : debug - Record-Access
+[2025-05-30 16:15:33] Route : debug - matching route: POST /status with GET /config/:id
+[2025-05-30 16:15:33] Route : debug - method not match
+[2025-05-30 16:15:33] Route : debug - matching route: POST /status with Post /start/:name
+[2025-05-30 16:15:33] URLMatcher : debug - Match for /status
+[2025-05-30 16:15:33] Route : debug - Not match matcher reg
+[2025-05-30 16:15:33] Route : debug - matching route: POST /status with Post /stop/:name
+[2025-05-30 16:15:33] URLMatcher : debug - Match for /status
+[2025-05-30 16:15:33] Route : debug - Not match matcher reg
+[2025-05-30 16:15:33] Route : debug - matching route: POST /status with GET /about
+[2025-05-30 16:15:33] Route : debug - method not match
+[2025-05-30 16:15:33] Route : debug - matching route: POST /status with POST /config
+[2025-05-30 16:15:33] Route : debug - matching route: POST /status with POST /login
+[2025-05-30 16:15:33] Route : debug - matching route: POST /status with GET /status
+[2025-05-30 16:15:33] Route : debug - method not match
+[2025-05-30 16:15:55] Access : info - From 127.0.0.1:57858-GET /api/status
+[2025-05-30 16:15:55] Access : info - match path: /api/
+[2025-05-30 16:15:55] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:15:55] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:15:55] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:15:55] Directive : debug - Record-Access
+[2025-05-30 16:15:55] Route : debug - matching route: GET /status with GET /config/:id
+[2025-05-30 16:15:55] URLMatcher : debug - Match for /status
+[2025-05-30 16:15:55] Route : debug - Not match matcher reg
+[2025-05-30 16:15:55] Route : debug - matching route: GET /status with Post /start/:name
+[2025-05-30 16:15:55] Route : debug - method not match
+[2025-05-30 16:15:55] Route : debug - matching route: GET /status with Post /stop/:name
+[2025-05-30 16:15:55] Route : debug - method not match
+[2025-05-30 16:15:55] Route : debug - matching route: GET /status with GET /about
+[2025-05-30 16:15:55] Route : debug - matching route: GET /status with POST /config
+[2025-05-30 16:15:55] Route : debug - method not match
+[2025-05-30 16:15:55] Route : debug - matching route: GET /status with POST /login
+[2025-05-30 16:15:55] Route : debug - method not match
+[2025-05-30 16:15:55] Route : debug - matching route: GET /status with GET /status
+[2025-05-30 16:17:27] Server : info - Load config success
+[2025-05-30 16:17:27] Server : info - start gohttpd
+[2025-05-30 16:17:27] ServerMux : debug - NewServeMux
+[2025-05-30 16:17:27] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:17:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:17:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:17:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:17:27] ServerMux : debug - NewServeMux
+[2025-05-30 16:17:27] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:17:27] Listener : debug - listen on :8088
+[2025-05-30 16:17:27] Server : info - gohttpd start success
+[2025-05-30 16:17:42] Access : info - From 127.0.0.1:43156-POST /api/stop/teststatic
+[2025-05-30 16:17:42] Access : info - match path: /api/
+[2025-05-30 16:17:42] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:17:42] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:17:42] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:17:42] Directive : debug - Record-Access
+[2025-05-30 16:17:42] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:17:42] Route : debug - method not match
+[2025-05-30 16:17:42] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:17:42] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:17:42] Route : debug - Not match matcher reg
+[2025-05-30 16:17:42] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:17:42] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:17:47] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:17:49] ServerListener : error - Server error:mux: server closed
+[2025-05-30 16:17:49] ServerListener : info - Server stopped:admin
+[2025-05-30 16:18:20] Access : info - From 127.0.0.1:43156-POST /api/start
+[2025-05-30 16:18:20] Access : info - match path: /api/
+[2025-05-30 16:18:20] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:18:20] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:18:20] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:18:20] Directive : debug - Record-Access
+[2025-05-30 16:18:20] Route : debug - matching route: POST /start with GET /config/:id
+[2025-05-30 16:18:20] Route : debug - method not match
+[2025-05-30 16:18:20] Route : debug - matching route: POST /start with Post /start/:name
+[2025-05-30 16:18:20] URLMatcher : debug - Match for /start
+[2025-05-30 16:18:20] Route : debug - Not match matcher reg
+[2025-05-30 16:18:20] Route : debug - matching route: POST /start with Post /stop/:name
+[2025-05-30 16:18:20] URLMatcher : debug - Match for /start
+[2025-05-30 16:18:20] Route : debug - Not match matcher reg
+[2025-05-30 16:18:20] Route : debug - matching route: POST /start with GET /about
+[2025-05-30 16:18:20] Route : debug - method not match
+[2025-05-30 16:18:20] Route : debug - matching route: POST /start with POST /config
+[2025-05-30 16:18:20] Route : debug - matching route: POST /start with POST /login
+[2025-05-30 16:18:20] Route : debug - matching route: POST /start with GET /status
+[2025-05-30 16:18:20] Route : debug - method not match
+[2025-05-30 16:18:31] Access : info - From 127.0.0.1:43156-POST /api/start/teststatic
+[2025-05-30 16:18:31] Access : info - match path: /api/
+[2025-05-30 16:18:31] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:18:31] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:18:31] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:18:31] Directive : debug - Record-Access
+[2025-05-30 16:18:31] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 16:18:31] Route : debug - method not match
+[2025-05-30 16:18:31] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 16:18:31] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 16:18:31] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:21:21] Server : info - Load config success
+[2025-05-30 16:21:21] Server : info - start gohttpd
+[2025-05-30 16:21:21] ServerMux : debug - NewServeMux
+[2025-05-30 16:21:21] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:21:21] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:21:21] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:21:21] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:21:21] ServerMux : debug - NewServeMux
+[2025-05-30 16:21:21] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:21:21] Listener : debug - listen on :8088
+[2025-05-30 16:21:21] Server : info - gohttpd start success
+[2025-05-30 16:21:40] Access : info - From 127.0.0.1:56320-GET /
+[2025-05-30 16:21:40] Access : info - match path: /
+[2025-05-30 16:21:40] Directive : debug - Record-Access
+[2025-05-30 16:21:40] filehandler : debug - access:/
+[2025-05-30 16:21:40] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 16:21:40] filehandler : debug - access:/index.html
+[2025-05-30 16:21:40] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 16:21:45] Access : info - From 127.0.0.1:56326-POST /api/stop/teststatic
+[2025-05-30 16:21:45] Access : info - match path: /api/
+[2025-05-30 16:21:45] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:21:45] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:21:45] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:21:45] Directive : debug - Record-Access
+[2025-05-30 16:21:45] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:21:45] Route : debug - method not match
+[2025-05-30 16:21:45] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:21:45] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:21:45] Route : debug - Not match matcher reg
+[2025-05-30 16:21:45] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:21:45] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:21:45] ServerListener : error - Server error:mux: server closed
+[2025-05-30 16:21:45] ServerListener : info - Server stopped:admin
+[2025-05-30 16:21:45] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:21:56] Access : info - From 127.0.0.1:56326-POST /api/start/teststatic
+[2025-05-30 16:21:56] Access : info - match path: /api/
+[2025-05-30 16:21:56] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:21:56] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:21:56] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:21:56] Directive : debug - Record-Access
+[2025-05-30 16:21:56] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 16:21:56] Route : debug - method not match
+[2025-05-30 16:21:56] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 16:21:56] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 16:21:56] ServerListener : error - Server error:mux: listener closed
+[2025-05-30 16:21:56] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:22:50] Server : info - Load config success
+[2025-05-30 16:22:50] Server : info - start gohttpd
+[2025-05-30 16:22:50] ServerMux : debug - NewServeMux
+[2025-05-30 16:22:50] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:22:50] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:22:50] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:22:50] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:22:50] ServerMux : debug - NewServeMux
+[2025-05-30 16:22:50] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:22:50] Listener : debug - listen on :8088
+[2025-05-30 16:22:50] Server : info - gohttpd start success
+[2025-05-30 16:22:52] Access : info - From 127.0.0.1:32842-GET /
+[2025-05-30 16:22:52] Access : info - match path: /
+[2025-05-30 16:22:52] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:22:52] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:22:52] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:22:52] Directive : debug - Record-Access
+[2025-05-30 16:22:52] filehandler : debug - access:/
+[2025-05-30 16:22:52] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:22:52] filehandler : debug - access:/index.html
+[2025-05-30 16:22:52] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:22:52] Access : info - From 127.0.0.1:32842-GET /favicon.ico
+[2025-05-30 16:22:52] Access : info - match path: /
+[2025-05-30 16:22:52] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:22:52] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:22:52] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:22:52] Directive : debug - Record-Access
+[2025-05-30 16:22:52] filehandler : debug - access:/favicon.ico
+[2025-05-30 16:22:52] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/favicon.ico
+[2025-05-30 16:22:52] filehandler : error - access file error:/persistent/home/kingecg/work/code/gohttp/adminui/favicon.icostat /persistent/home/kingecg/work/code/gohttp/adminui/favicon.ico: no such file or directory
+[2025-05-30 16:31:32] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:31:32] Access : info - match path: /
+[2025-05-30 16:31:32] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:31:32] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:31:32] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:31:32] Directive : debug - Record-Access
+[2025-05-30 16:31:32] filehandler : debug - access:/
+[2025-05-30 16:31:32] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:31:32] filehandler : debug - access:/index.html
+[2025-05-30 16:31:32] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:31:42] Access : info - From 127.0.0.1:52002-POST /api/stop/teststatic
+[2025-05-30 16:31:42] Access : info - match path: /api/
+[2025-05-30 16:31:42] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:31:42] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:31:42] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:31:42] Directive : debug - Record-Access
+[2025-05-30 16:31:42] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:31:42] Route : debug - method not match
+[2025-05-30 16:31:42] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:31:42] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:31:42] Route : debug - Not match matcher reg
+[2025-05-30 16:31:42] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:31:42] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:31:42] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:31:42] ServerListener : error - Server error:mux: server closed
+[2025-05-30 16:31:42] ServerListener : info - Server stopped:admin
+[2025-05-30 16:31:45] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:31:45] Access : info - match path: /
+[2025-05-30 16:31:45] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:31:45] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:31:45] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:31:45] Directive : debug - Record-Access
+[2025-05-30 16:31:45] filehandler : debug - access:/
+[2025-05-30 16:31:45] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:31:45] filehandler : debug - access:/index.html
+[2025-05-30 16:31:45] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:31:52] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:31:52] Access : info - match path: /
+[2025-05-30 16:31:52] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:31:52] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:31:52] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:31:52] Directive : debug - Record-Access
+[2025-05-30 16:31:52] filehandler : debug - access:/
+[2025-05-30 16:31:52] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:31:52] filehandler : debug - access:/index.html
+[2025-05-30 16:31:52] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:31:59] Access : info - From 127.0.0.1:52002-POST /api/start/teststatic
+[2025-05-30 16:31:59] Access : info - match path: /api/
+[2025-05-30 16:31:59] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:31:59] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:31:59] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:31:59] Directive : debug - Record-Access
+[2025-05-30 16:31:59] Route : debug - matching route: POST /start/teststatic with GET /config/:id
+[2025-05-30 16:31:59] Route : debug - method not match
+[2025-05-30 16:31:59] Route : debug - matching route: POST /start/teststatic with Post /start/:name
+[2025-05-30 16:31:59] URLMatcher : debug - Match for /start/teststatic
+[2025-05-30 16:31:59] ServerListener : error - Server error:mux: server closed
+[2025-05-30 16:31:59] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:32:06] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:32:06] Access : info - match path: /
+[2025-05-30 16:32:06] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:32:06] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:32:06] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:32:06] Directive : debug - Record-Access
+[2025-05-30 16:32:06] filehandler : debug - access:/
+[2025-05-30 16:32:06] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:32:06] filehandler : debug - access:/index.html
+[2025-05-30 16:32:06] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:32:06] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:32:06] Access : info - match path: /
+[2025-05-30 16:32:06] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:32:06] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:32:06] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:32:06] Directive : debug - Record-Access
+[2025-05-30 16:32:06] filehandler : debug - access:/
+[2025-05-30 16:32:06] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:32:06] filehandler : debug - access:/index.html
+[2025-05-30 16:32:06] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:32:07] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:32:07] Access : info - match path: /
+[2025-05-30 16:32:07] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:32:07] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:32:07] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:32:07] Directive : debug - Record-Access
+[2025-05-30 16:32:07] filehandler : debug - access:/
+[2025-05-30 16:32:07] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:32:07] filehandler : debug - access:/index.html
+[2025-05-30 16:32:07] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:32:08] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:32:08] Access : info - match path: /
+[2025-05-30 16:32:08] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:32:08] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:32:08] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:32:08] Directive : debug - Record-Access
+[2025-05-30 16:32:08] filehandler : debug - access:/
+[2025-05-30 16:32:08] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:32:08] filehandler : debug - access:/index.html
+[2025-05-30 16:32:08] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:32:09] Access : info - From 127.0.0.1:46932-GET /
+[2025-05-30 16:32:09] Access : info - match path: /
+[2025-05-30 16:32:09] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:32:09] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:32:09] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:32:09] Directive : debug - Record-Access
+[2025-05-30 16:32:09] filehandler : debug - access:/
+[2025-05-30 16:32:09] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:32:09] filehandler : debug - access:/index.html
+[2025-05-30 16:32:09] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:36:26] Server : info - Load config success
+[2025-05-30 16:36:26] Server : info - start gohttpd
+[2025-05-30 16:36:26] ServerMux : debug - NewServeMux
+[2025-05-30 16:36:26] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:36:26] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:36:26] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:36:26] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:36:26] ServerMux : debug - NewServeMux
+[2025-05-30 16:36:26] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:36:26] Listener : debug - listen on :8088
+[2025-05-30 16:36:26] Server : info - gohttpd start success
+[2025-05-30 16:36:29] Access : info - From 127.0.0.1:59644-GET /
+[2025-05-30 16:36:29] Access : info - match path: /
+[2025-05-30 16:36:29] Directive : debug - Record-Access
+[2025-05-30 16:36:29] filehandler : debug - access:/
+[2025-05-30 16:36:29] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 16:36:29] filehandler : debug - access:/index.html
+[2025-05-30 16:36:29] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 16:36:37] Access : info - From 127.0.0.1:34934-POST /api/stop/teststatic
+[2025-05-30 16:36:37] Access : info - match path: /api/
+[2025-05-30 16:36:37] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:36:37] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:36:37] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:36:37] Directive : debug - Record-Access
+[2025-05-30 16:36:37] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:36:37] Route : debug - method not match
+[2025-05-30 16:36:37] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:36:37] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:36:37] Route : debug - Not match matcher reg
+[2025-05-30 16:36:37] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:36:37] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:37:40] Server : info - Load config success
+[2025-05-30 16:37:40] Server : info - start gohttpd
+[2025-05-30 16:37:40] ServerMux : debug - NewServeMux
+[2025-05-30 16:37:40] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:37:40] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:37:40] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:37:40] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:37:40] ServerMux : debug - NewServeMux
+[2025-05-30 16:37:40] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:37:40] Listener : debug - listen on :8088
+[2025-05-30 16:37:40] Server : info - gohttpd start success
+[2025-05-30 16:37:43] Access : info - From 127.0.0.1:35970-POST /api/stop/teststatic
+[2025-05-30 16:37:43] Access : info - match path: /api/
+[2025-05-30 16:37:43] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:37:43] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:37:43] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:37:43] Directive : debug - Record-Access
+[2025-05-30 16:37:43] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:37:43] Route : debug - method not match
+[2025-05-30 16:37:43] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:37:43] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:37:43] Route : debug - Not match matcher reg
+[2025-05-30 16:37:43] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:37:43] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:37:54] Access : info - From 127.0.0.1:57214-GET /
+[2025-05-30 16:37:54] Access : info - match path: /
+[2025-05-30 16:37:54] Directive : debug - Record-Access
+[2025-05-30 16:37:54] filehandler : debug - access:/
+[2025-05-30 16:37:54] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 16:37:54] filehandler : debug - access:/index.html
+[2025-05-30 16:37:54] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 16:37:57] Access : info - From 127.0.0.1:46442-GET /
+[2025-05-30 16:37:57] Access : info - match path: /
+[2025-05-30 16:37:57] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:37:57] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:37:57] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:37:57] Directive : debug - Record-Access
+[2025-05-30 16:37:57] filehandler : debug - access:/
+[2025-05-30 16:37:57] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:37:57] filehandler : debug - access:/index.html
+[2025-05-30 16:37:57] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:38:40] Access : info - From 127.0.0.1:55436-POST /api/stop/teststatic
+[2025-05-30 16:38:40] Access : info - match path: /api/
+[2025-05-30 16:38:40] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:38:40] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:38:40] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:38:40] Directive : debug - Record-Access
+[2025-05-30 16:38:40] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:38:40] Route : debug - method not match
+[2025-05-30 16:38:40] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:38:40] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:38:40] Route : debug - Not match matcher reg
+[2025-05-30 16:38:40] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:38:40] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:39:05] Access : info - From 127.0.0.1:35432-POST /api/stop/teststatic
+[2025-05-30 16:39:05] Access : info - match path: /api/
+[2025-05-30 16:39:05] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:39:05] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:39:05] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:39:05] Directive : debug - Record-Access
+[2025-05-30 16:39:05] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:39:05] Route : debug - method not match
+[2025-05-30 16:39:05] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:39:05] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:39:05] Route : debug - Not match matcher reg
+[2025-05-30 16:39:05] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:39:05] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:40:28] Access : info - From 127.0.0.1:59624-POST /api/stop/teststatic
+[2025-05-30 16:40:28] Access : info - match path: /api/
+[2025-05-30 16:40:28] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:40:28] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:40:28] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:40:28] Directive : debug - Record-Access
+[2025-05-30 16:40:28] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:40:28] Route : debug - method not match
+[2025-05-30 16:40:28] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:40:28] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:40:28] Route : debug - Not match matcher reg
+[2025-05-30 16:40:28] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:40:28] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:42:55] Server : info - Load config success
+[2025-05-30 16:42:55] Server : info - start gohttpd
+[2025-05-30 16:42:55] ServerMux : debug - NewServeMux
+[2025-05-30 16:42:55] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:42:55] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:42:55] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:42:55] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:42:55] ServerMux : debug - NewServeMux
+[2025-05-30 16:42:55] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:42:55] Listener : debug - listen on :8088
+[2025-05-30 16:42:55] Server : info - gohttpd start success
+[2025-05-30 16:43:09] Access : info - From 127.0.0.1:52388-POST /api/stop/teststatic
+[2025-05-30 16:43:09] Access : info - match path: /api/
+[2025-05-30 16:43:09] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:43:09] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:43:09] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:43:09] Directive : debug - Record-Access
+[2025-05-30 16:43:09] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:43:09] Route : debug - method not match
+[2025-05-30 16:43:09] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:43:09] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:43:09] Route : debug - Not match matcher reg
+[2025-05-30 16:43:09] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:43:09] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:44:39] Access : info - From 127.0.0.1:53382-POST /api/stop/teststatic
+[2025-05-30 16:44:39] Access : info - match path: /api/
+[2025-05-30 16:44:39] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:44:39] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:44:39] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:44:39] Directive : debug - Record-Access
+[2025-05-30 16:44:39] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:44:39] Route : debug - method not match
+[2025-05-30 16:44:39] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:44:39] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:44:39] Route : debug - Not match matcher reg
+[2025-05-30 16:44:39] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:44:39] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:48:59] Server : info - Load config success
+[2025-05-30 16:48:59] Server : info - start gohttpd
+[2025-05-30 16:48:59] ServerMux : debug - NewServeMux
+[2025-05-30 16:48:59] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:48:59] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:48:59] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:48:59] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:48:59] ServerMux : debug - NewServeMux
+[2025-05-30 16:48:59] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:48:59] Listener : debug - listen on :8088
+[2025-05-30 16:48:59] Server : info - gohttpd start success
+[2025-05-30 16:49:20] Access : info - From 127.0.0.1:59424-POST /api/stop/teststatic
+[2025-05-30 16:49:20] Access : info - match path: /api/
+[2025-05-30 16:49:20] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:49:20] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:49:20] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:49:20] Directive : debug - Record-Access
+[2025-05-30 16:49:20] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:49:20] Route : debug - method not match
+[2025-05-30 16:49:20] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:49:20] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:49:20] Route : debug - Not match matcher reg
+[2025-05-30 16:49:20] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:49:20] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:50:23] Server : info - Load config success
+[2025-05-30 16:50:23] Server : info - start gohttpd
+[2025-05-30 16:50:23] ServerMux : debug - NewServeMux
+[2025-05-30 16:50:23] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:50:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:50:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:50:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:50:23] ServerMux : debug - NewServeMux
+[2025-05-30 16:50:24] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:50:24] Listener : debug - listen on :8088
+[2025-05-30 16:50:24] Server : info - gohttpd start success
+[2025-05-30 16:51:17] Access : info - From 127.0.0.1:49136-POST /api/stop/teststatic
+[2025-05-30 16:51:17] Access : info - match path: /api/
+[2025-05-30 16:51:17] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:51:17] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:51:17] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:51:17] Directive : debug - Record-Access
+[2025-05-30 16:51:17] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:51:17] Route : debug - method not match
+[2025-05-30 16:51:17] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:51:17] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:51:17] Route : debug - Not match matcher reg
+[2025-05-30 16:51:17] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:51:17] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:51:24] Server : info - Load config success
+[2025-05-30 16:51:24] Server : info - start gohttpd
+[2025-05-30 16:51:24] ServerMux : debug - NewServeMux
+[2025-05-30 16:51:24] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:51:24] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:51:24] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:51:24] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:51:24] ServerMux : debug - NewServeMux
+[2025-05-30 16:51:24] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:51:24] Listener : debug - listen on :8088
+[2025-05-30 16:51:24] Server : info - gohttpd start success
+[2025-05-30 16:51:36] Access : info - From 127.0.0.1:48114-POST /api/stop/teststatic
+[2025-05-30 16:51:36] Access : info - match path: /api/
+[2025-05-30 16:51:36] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:51:36] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:51:36] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:51:36] Directive : debug - Record-Access
+[2025-05-30 16:51:36] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:51:36] Route : debug - method not match
+[2025-05-30 16:51:36] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:51:36] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:51:36] Route : debug - Not match matcher reg
+[2025-05-30 16:51:36] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:51:36] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:51:53] Server : info - Load config success
+[2025-05-30 16:51:53] Server : info - start gohttpd
+[2025-05-30 16:51:53] ServerMux : debug - NewServeMux
+[2025-05-30 16:51:53] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:51:53] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:51:53] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:51:53] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:51:53] ServerMux : debug - NewServeMux
+[2025-05-30 16:51:53] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:51:53] Listener : debug - listen on :8088
+[2025-05-30 16:51:53] Server : info - gohttpd start success
+[2025-05-30 16:52:04] Access : info - From 127.0.0.1:52248-POST /api/stop/teststatic
+[2025-05-30 16:52:04] Access : info - match path: /api/
+[2025-05-30 16:52:04] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:52:04] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:52:04] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:52:04] Directive : debug - Record-Access
+[2025-05-30 16:52:04] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:52:04] Route : debug - method not match
+[2025-05-30 16:52:04] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:52:04] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:52:04] Route : debug - Not match matcher reg
+[2025-05-30 16:52:04] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:52:04] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:52:42] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:52:44] ServerListener : error - Server error:mux: server closed
+[2025-05-30 16:52:44] ServerListener : info - Server stopped:admin
+[2025-05-30 16:53:23] Server : info - Load config success
+[2025-05-30 16:53:23] Server : info - start gohttpd
+[2025-05-30 16:53:23] ServerMux : debug - NewServeMux
+[2025-05-30 16:53:23] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:53:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:53:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:53:23] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:53:23] ServerMux : debug - NewServeMux
+[2025-05-30 16:53:23] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:53:23] Listener : debug - listen on :8088
+[2025-05-30 16:53:23] Server : info - gohttpd start success
+[2025-05-30 16:53:46] Access : info - From 127.0.0.1:41478-GET /
+[2025-05-30 16:53:46] Access : info - match path: /
+[2025-05-30 16:53:46] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:53:46] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:53:46] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:53:46] Directive : debug - Record-Access
+[2025-05-30 16:53:46] filehandler : debug - access:/
+[2025-05-30 16:53:46] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 16:53:46] filehandler : debug - access:/index.html
+[2025-05-30 16:53:46] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 16:53:51] Access : info - From 127.0.0.1:41488-POST /api/stop/teststatic
+[2025-05-30 16:53:51] Access : info - match path: /api/
+[2025-05-30 16:53:51] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:53:51] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:53:51] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:53:51] Directive : debug - Record-Access
+[2025-05-30 16:53:51] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:53:51] Route : debug - method not match
+[2025-05-30 16:53:51] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:53:51] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:53:51] Route : debug - Not match matcher reg
+[2025-05-30 16:53:51] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:53:51] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:55:04] ServerListener : error - Server error:mux: server closed
+[2025-05-30 16:55:04] ServerListener : info - Server stopped:teststatic
+[2025-05-30 16:55:04] ServerListener : info - Server stopped:admin
+[2025-05-30 16:55:08] Server : info - Load config success
+[2025-05-30 16:55:08] Server : info - start gohttpd
+[2025-05-30 16:55:08] ServerMux : debug - NewServeMux
+[2025-05-30 16:55:08] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:55:08] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:55:08] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:55:08] ServerMux : debug - add directive: Set-Header
+[2025-05-30 16:55:08] ServerMux : debug - NewServeMux
+[2025-05-30 16:55:08] ServerMux : debug - add directive: Record-Access
+[2025-05-30 16:55:08] Listener : debug - listen on :8088
+[2025-05-30 16:55:08] Server : info - gohttpd start success
+[2025-05-30 16:55:09] Access : info - From 127.0.0.1:52178-POST /api/stop/teststatic
+[2025-05-30 16:55:09] Access : info - match path: /api/
+[2025-05-30 16:55:09] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 16:55:09] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 16:55:09] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 16:55:09] Directive : debug - Record-Access
+[2025-05-30 16:55:09] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 16:55:09] Route : debug - method not match
+[2025-05-30 16:55:09] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 16:55:09] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 16:55:09] Route : debug - Not match matcher reg
+[2025-05-30 16:55:09] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 16:55:09] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 17:12:10] Server : info - Load config success
+[2025-05-30 17:12:10] Server : info - start gohttpd
+[2025-05-30 17:12:10] ServerMux : debug - NewServeMux
+[2025-05-30 17:12:10] ServerMux : debug - add directive: Record-Access
+[2025-05-30 17:12:10] ServerMux : debug - add directive: Set-Header
+[2025-05-30 17:12:10] ServerMux : debug - add directive: Set-Header
+[2025-05-30 17:12:10] ServerMux : debug - add directive: Set-Header
+[2025-05-30 17:12:10] ServerMux : debug - NewServeMux
+[2025-05-30 17:12:10] ServerMux : debug - add directive: Record-Access
+[2025-05-30 17:12:10] Listener : debug - listen on :8088
+[2025-05-30 17:12:10] Server : info - gohttpd start success
+[2025-05-30 17:12:14] Access : info - From 127.0.0.1:44816-POST /api/stop/teststatic
+[2025-05-30 17:12:14] Access : info - match path: /api/
+[2025-05-30 17:12:14] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 17:12:14] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 17:12:14] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 17:12:14] Directive : debug - Record-Access
+[2025-05-30 17:12:14] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 17:12:14] Route : debug - method not match
+[2025-05-30 17:12:14] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 17:12:14] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 17:12:14] Route : debug - Not match matcher reg
+[2025-05-30 17:12:14] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 17:12:14] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 17:12:33] Access : info - From 127.0.0.1:33838-GET /
+[2025-05-30 17:12:33] Access : info - match path: /
+[2025-05-30 17:12:33] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 17:12:33] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 17:12:33] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 17:12:33] Directive : debug - Record-Access
+[2025-05-30 17:12:33] filehandler : debug - access:/
+[2025-05-30 17:12:33] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui
+[2025-05-30 17:12:33] filehandler : debug - access:/index.html
+[2025-05-30 17:12:33] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/adminui/index.html
+[2025-05-30 17:12:35] Access : info - From 127.0.0.1:33848-GET /
+[2025-05-30 17:12:35] Access : info - match path: /
+[2025-05-30 17:12:35] Directive : debug - Record-Access
+[2025-05-30 17:12:35] filehandler : debug - access:/
+[2025-05-30 17:12:35] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 17:12:35] filehandler : debug - access:/index.html
+[2025-05-30 17:12:35] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 17:36:28] Server : info - Load config success
+[2025-05-30 17:36:28] Server : info - start gohttpd
+[2025-05-30 17:36:28] ServerMux : debug - NewServeMux
+[2025-05-30 17:36:28] ServerMux : debug - add directive: Record-Access
+[2025-05-30 17:36:28] ServerMux : debug - add directive: Set-Header
+[2025-05-30 17:36:28] ServerMux : debug - add directive: Set-Header
+[2025-05-30 17:36:28] ServerMux : debug - add directive: Set-Header
+[2025-05-30 17:36:28] ServerMux : debug - NewServeMux
+[2025-05-30 17:36:28] ServerMux : debug - add directive: Record-Access
+[2025-05-30 17:36:28] Listener : debug - listen on :8088
+[2025-05-30 17:36:28] Server : info - gohttpd start success
+[2025-05-30 17:36:34] Access : info - From 127.0.0.1:53564-POST /api/stop/teststatic
+[2025-05-30 17:36:34] Access : info - match path: /api/
+[2025-05-30 17:36:34] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 17:36:34] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 17:36:34] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 17:36:34] Directive : debug - Record-Access
+[2025-05-30 17:36:34] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 17:36:34] Route : debug - method not match
+[2025-05-30 17:36:34] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 17:36:34] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 17:36:34] Route : debug - Not match matcher reg
+[2025-05-30 17:36:34] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 17:36:34] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 17:37:18] Access : info - From 127.0.0.1:56056-GET /
+[2025-05-30 17:37:18] Access : info - match path: /
+[2025-05-30 17:37:18] Directive : debug - Record-Access
+[2025-05-30 17:37:18] filehandler : debug - access:/
+[2025-05-30 17:37:18] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example
+[2025-05-30 17:37:18] filehandler : debug - access:/index.html
+[2025-05-30 17:37:18] filehandler : debug - access:/persistent/home/kingecg/work/code/gohttp/example/index.html
+[2025-05-30 18:08:48] Access : info - From 127.0.0.1:49942-POST /api/stop/teststatic
+[2025-05-30 18:08:48] Access : info - match path: /api/
+[2025-05-30 18:08:48] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 18:08:48] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 18:08:48] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 18:08:48] Directive : debug - Record-Access
+[2025-05-30 18:08:48] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 18:08:48] Route : debug - method not match
+[2025-05-30 18:08:48] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 18:08:48] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:08:48] Route : debug - Not match matcher reg
+[2025-05-30 18:08:48] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 18:08:48] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:15:03] Server : info - Load config success
+[2025-05-30 18:15:03] Server : info - start gohttpd
+[2025-05-30 18:15:03] ServerMux : debug - NewServeMux
+[2025-05-30 18:15:03] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:15:03] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:15:03] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:15:03] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:15:03] ServerMux : debug - NewServeMux
+[2025-05-30 18:15:03] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:15:03] Listener : debug - listen on :8088
+[2025-05-30 18:15:03] Server : info - gohttpd start success
+[2025-05-30 18:15:08] Access : info - From 127.0.0.1:52796-POST /api/stop/teststatic
+[2025-05-30 18:15:08] Access : info - match path: /api/
+[2025-05-30 18:15:08] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 18:15:08] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 18:15:08] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 18:15:08] Directive : debug - Record-Access
+[2025-05-30 18:15:08] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 18:15:08] Route : debug - method not match
+[2025-05-30 18:15:08] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 18:15:08] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:15:08] Route : debug - Not match matcher reg
+[2025-05-30 18:15:08] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 18:15:08] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:16:18] Server : info - Load config success
+[2025-05-30 18:16:18] Server : info - start gohttpd
+[2025-05-30 18:16:18] ServerMux : debug - NewServeMux
+[2025-05-30 18:16:18] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:16:18] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:16:18] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:16:18] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:16:18] ServerMux : debug - NewServeMux
+[2025-05-30 18:16:18] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:16:18] Listener : debug - listen on :8088
+[2025-05-30 18:16:18] Server : info - gohttpd start success
+[2025-05-30 18:16:25] Access : info - From 127.0.0.1:48440-POST /api/stop/teststatic
+[2025-05-30 18:16:25] Access : info - match path: /api/
+[2025-05-30 18:16:25] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 18:16:25] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 18:16:25] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 18:16:25] Directive : debug - Record-Access
+[2025-05-30 18:16:25] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 18:16:25] Route : debug - method not match
+[2025-05-30 18:16:25] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 18:16:25] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:16:25] Route : debug - Not match matcher reg
+[2025-05-30 18:16:25] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 18:16:25] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:19:27] Server : info - Load config success
+[2025-05-30 18:19:27] Server : info - start gohttpd
+[2025-05-30 18:19:27] ServerMux : debug - NewServeMux
+[2025-05-30 18:19:27] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:19:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:19:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:19:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:19:27] ServerMux : debug - NewServeMux
+[2025-05-30 18:19:27] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:19:27] Listener : debug - listen on :8088
+[2025-05-30 18:19:27] Server : info - gohttpd start success
+[2025-05-30 18:20:15] Access : info - From 127.0.0.1:49268-POST /api/stop/teststatic
+[2025-05-30 18:20:15] Access : info - match path: /api/
+[2025-05-30 18:20:15] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 18:20:15] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 18:20:15] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 18:20:15] Directive : debug - Record-Access
+[2025-05-30 18:20:15] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 18:20:15] Route : debug - method not match
+[2025-05-30 18:20:15] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 18:20:15] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:20:15] Route : debug - Not match matcher reg
+[2025-05-30 18:20:15] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 18:20:15] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:22:13] Access : info - From 127.0.0.1:47720-POST /api/stop/teststatic
+[2025-05-30 18:22:13] Access : info - match path: /api/
+[2025-05-30 18:22:13] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 18:22:13] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 18:22:13] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 18:22:13] Directive : debug - Record-Access
+[2025-05-30 18:22:13] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 18:22:13] Route : debug - method not match
+[2025-05-30 18:22:13] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 18:22:13] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:22:13] Route : debug - Not match matcher reg
+[2025-05-30 18:22:13] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 18:22:13] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:22:27] Server : info - Load config success
+[2025-05-30 18:22:27] Server : info - start gohttpd
+[2025-05-30 18:22:27] ServerMux : debug - NewServeMux
+[2025-05-30 18:22:27] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:22:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:22:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:22:27] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:22:27] ServerMux : debug - NewServeMux
+[2025-05-30 18:22:27] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:22:27] Listener : debug - listen on :8088
+[2025-05-30 18:22:27] Server : info - gohttpd start success
+[2025-05-30 18:22:51] Access : info - From 127.0.0.1:48508-POST /api/stop/teststatic
+[2025-05-30 18:22:51] Access : info - match path: /api/
+[2025-05-30 18:22:51] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 18:22:51] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 18:22:51] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 18:22:51] Directive : debug - Record-Access
+[2025-05-30 18:22:51] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 18:22:51] Route : debug - method not match
+[2025-05-30 18:22:51] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 18:22:51] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:22:51] Route : debug - Not match matcher reg
+[2025-05-30 18:22:51] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 18:22:51] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:24:46] Server : info - Load config success
+[2025-05-30 18:24:46] Server : info - start gohttpd
+[2025-05-30 18:24:46] ServerMux : debug - NewServeMux
+[2025-05-30 18:24:46] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:24:46] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:24:46] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:24:46] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:24:46] ServerMux : debug - NewServeMux
+[2025-05-30 18:24:46] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:24:46] Listener : debug - listen on :8088
+[2025-05-30 18:24:46] Server : info - gohttpd start success
+[2025-05-30 18:27:51] Server : info - Load config success
+[2025-05-30 18:27:51] Server : info - start gohttpd
+[2025-05-30 18:27:51] ServerMux : debug - NewServeMux
+[2025-05-30 18:27:51] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:27:51] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:27:51] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:27:51] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:27:51] ServerMux : debug - NewServeMux
+[2025-05-30 18:27:51] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:27:51] Listener : debug - listen on :8088
+[2025-05-30 18:27:51] Server : info - gohttpd start success
+[2025-05-30 18:28:01] Access : info - From 127.0.0.1:32842-POST /api/stop/teststatic
+[2025-05-30 18:28:01] Access : info - match path: /api/
+[2025-05-30 18:28:01] Directive : debug - Set-Header Access-Control-Allow-Headers:Content-Type, Authorization, Content-Length, X-Requested-With
+[2025-05-30 18:28:01] Directive : debug - Set-Header Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
+[2025-05-30 18:28:01] Directive : debug - Set-Header Access-Control-Allow-Origin:*
+[2025-05-30 18:28:01] Directive : debug - Record-Access
+[2025-05-30 18:28:01] Route : debug - matching route: POST /stop/teststatic with GET /config/:id
+[2025-05-30 18:28:01] Route : debug - method not match
+[2025-05-30 18:28:01] Route : debug - matching route: POST /stop/teststatic with Post /start/:name
+[2025-05-30 18:28:01] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:28:01] Route : debug - Not match matcher reg
+[2025-05-30 18:28:01] Route : debug - matching route: POST /stop/teststatic with Post /stop/:name
+[2025-05-30 18:28:01] URLMatcher : debug - Match for /stop/teststatic
+[2025-05-30 18:39:30] Server : info - Load config success
+[2025-05-30 18:39:30] Server : info - start gohttpd
+[2025-05-30 18:39:30] ServerMux : debug - NewServeMux
+[2025-05-30 18:39:30] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:39:30] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:39:30] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:39:30] ServerMux : debug - add directive: Set-Header
+[2025-05-30 18:39:30] ServerMux : debug - NewServeMux
+[2025-05-30 18:39:30] ServerMux : debug - add directive: Record-Access
+[2025-05-30 18:39:30] Listener : debug - listen on :8088
+[2025-05-30 18:39:30] Server : info - gohttpd start success
diff --git a/handler/proxy.go b/handler/proxy.go
index da9f354..4a1d94a 100644
--- a/handler/proxy.go
+++ b/handler/proxy.go
@@ -62,7 +62,8 @@ func makeProxy(upstream string, path *model.HttpPath, index int) *httputil.Rever
directiveHandlers := []func(r *http.Request){}
if len(path.Directives) > 0 {
for _, directive := range path.Directives {
- d := strings.Replace(string(directive), "$target", upstream, 1)
+ ndirective := strings.TrimPrefix(directive, "Proxy_")
+ d := strings.Replace(string(ndirective), "$target", upstream, 1)
dh := GetUpdaterFn(d)
if dh != nil {
directiveHandlers = append(directiveHandlers, dh)
@@ -106,48 +107,45 @@ func NewProxyHandler(p *model.HttpPath) *ProxyHandler {
}
ph.proxy = make([]*httputil.ReverseProxy, upstreamCount)
- // 从配置中获取健康检查参数,如果不存在则使用默认值
- var interval time.Duration = 10 * time.Second
- var timeout time.Duration = 5 * time.Second
- var retries int = 3
-
- // 使用服务器配置中的健康检查参数
- config := model.GetConfig()
- if config != nil && config.Admin != nil && config.Admin.HealthCheck != nil {
- if config.Admin.HealthCheck.Interval != "" {
- var err error
- interval, err = time.ParseDuration(config.Admin.HealthCheck.Interval)
- if err != nil {
- interval = 10 * time.Second // 默认值
- }
- }
- if config.Admin.HealthCheck.Timeout != "" {
- var err error
- timeout, err = time.ParseDuration(config.Admin.HealthCheck.Timeout)
- if err != nil {
- timeout = 5 * time.Second // 默认值
- }
- }
- if config.Admin.HealthCheck.Retries > 0 {
- retries = config.Admin.HealthCheck.Retries
- }
- }
-
for index, upstream := range p.Upstreams {
ph.proxy[index] = makeProxy(upstream, p, index)
}
- // 使用配置参数创建健康检查器
- ph.checker = healthcheck.NewHealthChecker(interval, timeout, retries)
- ph.checker.StartHealthCheck(ph.Upstreams, func(upstream string, healthy bool) {
- // 当上游服务器状态变化时的回调函数
- logger := gologger.GetLogger("Proxy")
- if !healthy {
- logger.Warn(fmt.Sprintf("Upstream %s is now unhealthy", upstream))
- } else {
- logger.Info(fmt.Sprintf("Upstream %s is now healthy", upstream))
+ if len(p.Upstreams) > 1 && p.HealthCheck != nil {
+ // 只有上游服务器数目大于1时才需要进行健康检查
+ // 从配置中获取健康检查参数,如果不存在则使用默认值
+ var interval time.Duration = 10 * time.Second
+ var timeout time.Duration = 5 * time.Second
+ var retries int = 3
+ if p.HealthCheck.Interval != "" {
+ var err error
+ interval, err = time.ParseDuration(p.HealthCheck.Interval)
+ if err != nil {
+ interval = 10 * time.Second // 默认值
+ }
}
- })
+ if p.HealthCheck.Timeout != "" {
+ var err error
+ timeout, err = time.ParseDuration(p.HealthCheck.Timeout)
+ if err != nil {
+ timeout = 5 * time.Second // 默认值
+ }
+ }
+ if p.HealthCheck.Retries > 0 {
+ retries = p.HealthCheck.Retries
+ }
+ // 使用配置参数创建健康检查器
+ ph.checker = healthcheck.NewHealthChecker(interval, timeout, retries)
+ ph.checker.StartHealthCheck(ph.Upstreams, func(upstream string, healthy bool) {
+ // 当上游服务器状态变化时的回调函数
+ logger := gologger.GetLogger("Proxy")
+ if !healthy {
+ logger.Warn(fmt.Sprintf("Upstream %s is now unhealthy", upstream))
+ } else {
+ logger.Info(fmt.Sprintf("Upstream %s is now healthy", upstream))
+ }
+ })
+ }
return ph
-}
\ No newline at end of file
+}
diff --git a/model/model.go b/model/model.go
index b7a9847..c835365 100644
--- a/model/model.go
+++ b/model/model.go
@@ -12,16 +12,17 @@ import (
type HealthCheckConfig struct {
Interval string `json:"interval,omitempty"` // 检查间隔时间
Timeout string `json:"timeout,omitempty"` // 单次检查超时时间
- Retries int `json:"retries,omitempty"` // 健康检查失败重试次数
+ Retries int `json:"retries,omitempty"` // 健康检查失败重试次数
}
// HttpPath 定义HTTP路径配置
type HttpPath struct {
- Path string `json:"path"`
- Root string `json:"root"`
- Default string `json:"default"`
- Upstreams []string `json:"upstreams"`
- Directives []string `json:"directives"`
+ Path string `json:"path"`
+ Root string `json:"root"`
+ Default string `json:"default"`
+ Upstreams []string `json:"upstreams"`
+ Directives []string `json:"directives"`
+ HealthCheck *HealthCheckConfig `json:"health_check,omitempty"`
}
type HeaderValueConst string
@@ -32,10 +33,10 @@ const (
// HttpServerConfig 定义HTTP服务器配置
type HttpServerConfig struct {
- Name string `json:"name"`
- ServerName string `json:"server"`
- Port int `json:"port"`
- Host string `json:"host"`
+ Name string `json:"name"`
+ ServerName string `json:"server"`
+ Port int `json:"port"`
+ Host string `json:"host"`
Paths []HttpPath `json:"paths"`
Username string `json:"username"`
Password string `json:"password"`
@@ -45,10 +46,10 @@ type HttpServerConfig struct {
AuthType string `json:"auth_type"`
Jwt *JwtConfig `json:"jwt"`
// 健康检查配置
- HealthCheck *HealthCheckConfig `json:"health_check,omitempty"`
+
// 访问控制配置
- AllowIPs []string `json:"allow_ips,omitempty"` // 允许访问的IP地址列表
- DenyIPs []string `json:"deny_ips,omitempty"` // 禁止访问的IP地址列表
+ AllowIPs []string `json:"allow_ips,omitempty"` // 允许访问的IP地址列表
+ DenyIPs []string `json:"deny_ips,omitempty"` // 禁止访问的IP地址列表
}
type JwtConfig struct {
diff --git a/server/directive.go b/server/directive.go
index cbe4ff2..0e6a54a 100644
--- a/server/directive.go
+++ b/server/directive.go
@@ -71,7 +71,7 @@ var BasicAuthDirective Directive = func(args ...string) Middleware {
var DirectiveMap = map[string]Directive{
"Set-Header": Set_Header,
"Add-Header": Add_Header,
- "Gzip_Response": Gzip_Response,
+ "Gzip-Response": Gzip_Response,
"Record-Access": DRecordAccess,
"Jwt-Auth": JWTDirective,
"Basic-Auth": BasicAuthDirective,
diff --git a/server/manager.go b/server/manager.go
index 435943e..688dd8b 100644
--- a/server/manager.go
+++ b/server/manager.go
@@ -2,10 +2,12 @@ package server
import (
"context"
+ "errors"
"fmt"
"net"
"net/http"
"strings"
+ "time"
"bufio"
"io"
@@ -30,10 +32,37 @@ func makeMatcher(name string, s *ServerListener) cmux.Matcher {
}
}
-type Server struct {
- Conf *model.HttpServerConfig
- *http.Server
+type sl struct {
+ net.Listener
+ closed bool
}
+
+func (sl *sl) Accept() (net.Conn, error) {
+ if sl.closed {
+ return nil, errors.New("closed")
+ }
+
+ return sl.Listener.Accept()
+}
+
+func (sl *sl) Close() error {
+ sl.closed = true
+ return nil
+}
+
+type Server struct {
+ Conf *model.HttpServerConfig
+ Closed bool
+ *http.Server
+ l *sl
+}
+
+func (s *Server) Renew() {
+ s.Server = &http.Server{
+ Handler: s.Handler,
+ }
+}
+
type ServerListener struct {
port int
listener cmux.CMux
@@ -48,28 +77,64 @@ func (s *ServerListener) ServerCount() int {
return len(s.servers)
}
-func (s *ServerListener) StartServer(name string) error {
+func (s *ServerListener) StartServer(name string) {
server, ok := s.servers[name]
+ serverName := server.Conf.ServerName
if !ok {
panic("No named server")
}
- l := s.listener.Match(makeMatcher(name, s))
- if server.Conf.CertFile != "" && server.Conf.KeyFile != "" {
- return server.ServeTLS(l, server.Conf.CertFile, server.Conf.KeyFile)
- }
- return server.Serve(l)
+ go func() {
+ var err error
+ defer func() {
+ l := logger.GetLogger("ServerListener")
+ if err != nil {
+ if err == http.ErrServerClosed {
+ server.Closed = true
+
+ } else {
+ l.Error("Server error:", err)
+ }
+
+ }
+ l.Info("Server stopped:", name)
+ }()
+ if server.Closed {
+ server.Renew()
+ }
+ if server.l == nil {
+ server.l = &sl{
+ Listener: s.listener.Match(makeMatcher(serverName, s)),
+ }
+ }
+
+ if server.Conf.CertFile != "" && server.Conf.KeyFile != "" {
+ err = server.ServeTLS(server.l, server.Conf.CertFile, server.Conf.KeyFile)
+ } else {
+ err = server.Serve(server.l)
+ }
+ }()
+
+ // return server.Serve(l)
}
+func (s *ServerListener) StopServer(name string) error {
+ server, ok := s.servers[name]
+ if !ok {
+ return nil
+ }
+ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+ defer cancel()
+ return server.Shutdown(ctx)
+}
+
+// Start 方法用于并发启动 ServerListener 中所有注册的服务器。
+// 它会为每个服务器创建一个新的 goroutine 来启动,以确保各个服务器可以独立运行。
func (s *ServerListener) Start() {
+ // 遍历 ServerListener 中所有注册的服务器
for name, _ := range s.servers {
- go func(name string) {
- err := s.StartServer(name)
- if err != nil {
- l := logger.GetLogger("ServerListener")
- l.Error("Start server error:", name, err)
- }
- }(name)
+ // 为每个服务器启动一个新的 goroutine 来执行启动操作
+ s.StartServer(name)
}
}
@@ -109,3 +174,35 @@ func AddServer(name string, server *Server, port int) {
}
listener.AddServer(name, server)
}
+
+func AddServerWithConfig(conf *model.HttpServerConfig) {
+ mux := NewServeMux(conf)
+ s := &http.Server{
+ Handler: mux,
+ }
+ name := conf.Name
+ port := conf.Port
+ ss := &Server{
+ Server: s,
+ Conf: conf,
+ }
+ AddServer(name, ss, port)
+}
+
+func StopServer(name string, port int) {
+ listenStr := fmt.Sprintf(":%d", port)
+ listener, ok := ServerManager[listenStr]
+ if !ok {
+ return
+ }
+ listener.StopServer(name)
+}
+
+func StartServer(name string, port int) {
+ listenStr := fmt.Sprintf(":%d", port)
+ listener, ok := ServerManager[listenStr]
+ if !ok {
+ return
+ }
+ listener.StartServer(name)
+}
diff --git a/server/middleware.go b/server/middleware.go
index 5895e5c..d583f6d 100644
--- a/server/middleware.go
+++ b/server/middleware.go
@@ -46,21 +46,6 @@ func (ml *MiddlewareLink) Add(m Middleware) {
}
}
-// func (ml *MiddlewareLink) ServeHTTP(w http.ResponseWriter, r *http.Request) bool {
-// canContinue := true
-// next := func() {
-// canContinue = true
-// }
-// for e := ml.Front(); e != nil && canContinue; e = e.Next() {
-// canContinue = false
-// e.Value.(Middleware)(w, r, next)
-// if !canContinue {
-// break
-// }
-// }
-// return canContinue
-// }
-
func (ml *MiddlewareLink) wrap(m Middleware, next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
m(w, r, next)
@@ -84,6 +69,18 @@ func (ml *MiddlewareLink) WrapHandler(next http.Handler) http.Handler {
}
return handler
}
+
+func (ml *MiddlewareLink) Clone() *MiddlewareLink {
+ ret := NewMiddlewareLink()
+ for e := ml.Back(); e != nil; e = e.Prev() {
+ middleware, ok := e.Value.(Middleware)
+ if !ok {
+ break
+ }
+ ret.Add(middleware)
+ }
+ return ret
+}
func NewMiddlewareLink() *MiddlewareLink {
ml := &MiddlewareLink{list.New()}
ml.Add(Done)
@@ -107,8 +104,12 @@ func BasicAuth(w http.ResponseWriter, r *http.Request, next http.Handler) {
}
func JwtAuth(w http.ResponseWriter, r *http.Request, next http.Handler) {
l := gologger.GetLogger("JwtAuth")
- config := model.GetConfig()
- jwtConfig := config.Admin.Jwt
+ config := getServerConfig(r)
+ if config == nil || config.Jwt == nil {
+ http.Error(w, "Jwt config error", http.StatusInternalServerError)
+ return
+ }
+ jwtConfig := config.Jwt
if jwtConfig.Secret == "" || path.Base(r.URL.Path) == "login" {
next.ServeHTTP(w, r)
return
@@ -178,16 +179,22 @@ func Parse[T any](w http.ResponseWriter, r *http.Request, next http.Handler) {
next.ServeHTTP(w, r)
}
-// IPAccessControl 中间件实现IP访问控制
-func IPAccessControl(w http.ResponseWriter, r *http.Request, next http.Handler) {
-
- // get serverName from request context
+func getServerConfig(r *http.Request) *model.HttpServerConfig {
ctx := r.Context()
serverName, ok := ctx.Value(RequestCtxKey("serverName")).(string)
if !ok {
serverName = ""
+ return nil
}
config := model.GetServerConfig(serverName)
+ return config
+}
+
+// IPAccessControl 中间件实现IP访问控制
+func IPAccessControl(w http.ResponseWriter, r *http.Request, next http.Handler) {
+
+ // get serverName from request context
+ config := getServerConfig(r)
if config != nil {
allowedIPs := config.AllowIPs
deniedIPs := config.DenyIPs
@@ -215,6 +222,8 @@ func IPAccessControl(w http.ResponseWriter, r *http.Request, next http.Handler)
return
}
}
+ } else {
+ http.Error(w, "Server Config Error", http.StatusInternalServerError)
}
next.ServeHTTP(w, r)
diff --git a/server/server.go b/server/server.go
index b6d30cf..e6f32ef 100644
--- a/server/server.go
+++ b/server/server.go
@@ -34,7 +34,7 @@ func (route *Route) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func (route *Route) Match(r *http.Request) bool {
l := logger.GetLogger("Route")
l.Debug(fmt.Sprintf("matching route: %s %s with %s %s", r.Method, r.URL.Path, route.Method, route.Path))
- if route.Method != "" && route.Method != r.Method {
+ if route.Method != "" && strings.ToLower(route.Method) != strings.ToLower(r.Method) {
l.Debug("method not match")
return false
}
@@ -216,11 +216,26 @@ type ServerMux struct {
wrappedHandler map[string]http.Handler
}
-func (s *ServerMux) Handle(pattern string, handler http.Handler) {
+func (s *ServerMux) Handle(pattern string, handler http.Handler, directives []string) {
if s.handlers == nil {
s.handlers = make(map[string]http.Handler)
}
- s.handlers[pattern] = s.directiveHandlers.WrapHandler(handler)
+ nMiddleWareLink := s.directiveHandlers.Clone()
+ for _, directive := range directives {
+ strs := strings.Split(directive, " ")
+ directiveName := strs[0]
+ p := strings.Split(directiveName, "_")
+ if len(p) > 1 {
+ continue // 跳过自定义指令
+ }
+ params := strs[1:]
+ directive, ok := DirectiveMap[directiveName]
+ if ok {
+ nMiddleWareLink.Add(directive(params...))
+ }
+ // nMiddleWareLink.Add(GetDirective(directive))
+ }
+ s.handlers[pattern] = nMiddleWareLink.WrapHandler(handler)
s.paths = append(s.paths, pattern)
// 自定义比较函数排序s.paths
sort.Slice(s.paths, func(i, j int) bool {
@@ -263,23 +278,7 @@ func (s *ServerMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
fhandler.ServeHTTP(w, newRequest)
return
}
- // s.handlers[p].ServeHTTP(w, newRequest)
- // s.directiveHandlers.ServeHTTP(w, newRequest)
- // ctx := newRequest.Context()
- // m := ctx.Value(RequestCtxKey("data")).(map[string]interface{})
- // _, ok := m["Tg"]
- // if ok {
- // wrappedHandler := s.wrappedHandler[p]
- // if wrappedHandler == nil {
- // s.wrappedHandler[p] = gzip.DefaultHandler().WrapHandler(s.handlers[p])
- // wrappedHandler = s.wrappedHandler[p]
- // }
- // wrappedHandler.ServeHTTP(w, newRequest)
- // } else {
- // s.handlers[p].ServeHTTP(w, newRequest)
- // }
- // return
}
}
l.Error(fmt.Sprintf("404: %s", r.URL.Path))
@@ -318,18 +317,19 @@ func NewServeMux(c *model.HttpServerConfig) *ServerMux {
// 将指令添加到 ServerMux 的指令处理中间件链中
s.AddDirective(string(directive))
}
- if c.AuthType == "jwt" {
- s.AddDirective("Jwt-Auth")
- }
- if c.AuthType == "basic" {
- s.AddDirective("Basic-Auth")
- }
+ // if c.AuthType == "jwt" {
+ // s.AddDirective("Jwt-Auth")
+ // }
+ // if c.AuthType == "basic" {
+ // s.AddDirective("Basic-Auth")
+ // }
// 遍历配置中的所有 HTTP 路径
for _, httpPath := range c.Paths {
// 检查路径配置中是否指定了根目录
+ var fhandler http.Handler = nil
if httpPath.Root != "" {
// 创建一个新的文件处理程序
- fileHandler := handler.NewFileHandler(handler.FileHandler{
+ fhandler = handler.NewFileHandler(handler.FileHandler{
WPath: httpPath.Path,
// 设置文件处理程序的根目录
Root: httpPath.Root,
@@ -337,18 +337,23 @@ func NewServeMux(c *model.HttpServerConfig) *ServerMux {
Default: httpPath.Default,
})
// 将文件处理程序注册到 ServerMux 中
- s.Handle(httpPath.Path, fileHandler)
+
// 检查路径配置中是否指定了上游服务器
} else if len(httpPath.Upstreams) != 0 {
// 创建一个新的代理处理程序
- proxyHandler := handler.NewProxyHandler(&httpPath)
+ fhandler = handler.NewProxyHandler(&httpPath)
// 将代理处理程序注册到 ServerMux 中
- s.Handle(httpPath.Path, proxyHandler)
+ // s.Handle(httpPath.Path, proxyHandler)
// 如果既没有指定根目录也没有指定上游服务器
} else {
// 记录不支持的路径类型错误信息
l.Error("Not supportted server path type :", httpPath.Path)
}
+ if fhandler != nil {
+ directives := httpPath.Directives
+ s.Handle(httpPath.Path, fhandler, directives)
+ }
+ // s.Handle(httpPath.Path, fhandler)
}
// 返回初始化好的 ServerMux 实例
return s