caddy服务器配置范例

admin 发表于 [Golang] 分类,标签: HTTP caddy
0

Caddyfile文件内容:

localhost 127.0.0.1 {
        tls off
        root E:\www_pre
        gzip
        fastcgi / 127.0.0.1:9070 php
        log access_local.log
        header /api Access-Control-Allow-Origin *
}

coscms.com www.coscms.com {
        tls https_cert/cert.pem https_cert/key.pem
        #tls test@admpub.com
        root E:\www
        gzip
        fastcgi / 127.0.0.1:9070  {
                ext   .php
                split .php
                index index.php
                env   myVarKey1 myVarValue1
                env   myVarKey2 myVarValue2
                env   myVarKey3 myVarValue3
        }
        log access_coscms.log
}

详细文档:https://caddyserver.com/docs/fastcgi

发表我的评论