mirror of
https://github.com/caddyserver/caddy.git
synced 2026-09-01 00:48:03 +00:00
Begin implementing HTTP replacer and static responder
This commit is contained in:
parent
1136e2cfee
commit
2eb3593327
6 changed files with 161 additions and 30 deletions
|
|
@ -1,28 +1,18 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
_ "net/http/pprof"
|
||||
|
||||
"bitbucket.org/lightcodelabs/caddy2"
|
||||
caddycmd "bitbucket.org/lightcodelabs/caddy2/cmd"
|
||||
|
||||
// this is where modules get plugged in
|
||||
|
||||
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
|
||||
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/caddylog"
|
||||
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/reverseproxy"
|
||||
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/staticfiles"
|
||||
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/staticresp"
|
||||
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddytls"
|
||||
_ "bitbucket.org/lightcodelabs/dynamicconfig"
|
||||
_ "bitbucket.org/lightcodelabs/proxy"
|
||||
)
|
||||
|
||||
func main() {
|
||||
err := caddy2.StartAdmin("127.0.0.1:1234")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer caddy2.StopAdmin()
|
||||
|
||||
select {}
|
||||
caddycmd.Main()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue