fix caddy-git
This commit is contained in:
parent
6e40671010
commit
d44e52c3ca
|
@ -1 +0,0 @@
|
||||||
../caddy/Caddyfile
|
|
40
repo/caddy-git/Caddyfile
Normal file
40
repo/caddy-git/Caddyfile
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# The Caddyfile is an easy way to configure your Caddy web server.
|
||||||
|
#
|
||||||
|
# https://caddyserver.com/docs/caddyfile
|
||||||
|
#
|
||||||
|
# The configuration below serves a welcome page over HTTP on port 80.
|
||||||
|
# To use your own domain name (with automatic HTTPS), first make
|
||||||
|
# sure your domain's A/AAAA DNS records are properly pointed to
|
||||||
|
# this machine's public IP, then replace the line below with your
|
||||||
|
# domain name.
|
||||||
|
#
|
||||||
|
# https://caddyserver.com/docs/caddyfile/concepts#addresses
|
||||||
|
|
||||||
|
{
|
||||||
|
# Restrict the admin interface to a local unix file socket whose directory
|
||||||
|
# is restricted to caddy:caddy. By default the TCP socket allows arbitrary
|
||||||
|
# modification for any process and user that has access to the local
|
||||||
|
# interface. If admin over TCP is turned on one should make sure
|
||||||
|
# implications are well understood.
|
||||||
|
admin "unix//run/caddy/admin.socket"
|
||||||
|
}
|
||||||
|
|
||||||
|
http:// {
|
||||||
|
# Set this path to your site's directory.
|
||||||
|
root * /usr/share/caddy
|
||||||
|
|
||||||
|
# Enable the static file server.
|
||||||
|
file_server
|
||||||
|
|
||||||
|
# Another common task is to set up a reverse proxy:
|
||||||
|
# reverse_proxy localhost:8080
|
||||||
|
|
||||||
|
# Or serve a PHP site through php-fpm:
|
||||||
|
# php_fastcgi localhost:9000
|
||||||
|
|
||||||
|
# Refer to the directive documentation for more options.
|
||||||
|
# https://caddyserver.com/docs/caddyfile/directives
|
||||||
|
}
|
||||||
|
|
||||||
|
# Import additional caddy config files in /etc/caddy/conf.d/
|
||||||
|
import /etc/caddy/conf.d/*
|
|
@ -1 +0,0 @@
|
||||||
../caddy/caddy.sysusers
|
|
1
repo/caddy-git/caddy.sysusers
Normal file
1
repo/caddy-git/caddy.sysusers
Normal file
|
@ -0,0 +1 @@
|
||||||
|
u caddy - "caddy daemon" /var/lib/caddy
|
|
@ -1 +0,0 @@
|
||||||
../caddy/caddy.tmpfiles
|
|
3
repo/caddy-git/caddy.tmpfiles
Normal file
3
repo/caddy-git/caddy.tmpfiles
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
d /var/lib/caddy 0750 caddy caddy
|
||||||
|
d /var/log/caddy 0750 caddy caddy
|
||||||
|
d /run/caddy 0750 caddy caddy
|
|
@ -1 +0,0 @@
|
||||||
../caddy/main.go
|
|
52
repo/caddy-git/main.go
Normal file
52
repo/caddy-git/main.go
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
// Copyright 2015 Matthew Holt and The Caddy Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Package main is the entry point of the Caddy application.
|
||||||
|
// Most of Caddy's functionality is provided through modules,
|
||||||
|
// which can be plugged in by adding their import below.
|
||||||
|
//
|
||||||
|
// There is no need to modify the Caddy source code to customize your
|
||||||
|
// builds. You can easily build a custom Caddy with these simple steps:
|
||||||
|
//
|
||||||
|
// 1. Copy this file (main.go) into a new folder
|
||||||
|
// 2. Edit the imports below to include the modules you want plugged in
|
||||||
|
// 3. Run `go mod init caddy`
|
||||||
|
// 4. Run `go install` or `go build` - you now have a custom binary!
|
||||||
|
//
|
||||||
|
// Or you can use xcaddy which does it all for you as a command:
|
||||||
|
// https://github.com/caddyserver/xcaddy
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
||||||
|
|
||||||
|
// plug in Caddy modules here
|
||||||
|
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
||||||
|
|
||||||
|
_ "github.com/caddyserver/forwardproxy"
|
||||||
|
|
||||||
|
_ "github.com/mholt/caddy-ratelimit"
|
||||||
|
_ "github.com/caddyserver/replace-response"
|
||||||
|
_ "github.com/silinternational/certmagic-storage-dynamodb/v3"
|
||||||
|
_ "github.com/abiosoft/caddy-json-schema"
|
||||||
|
_ "github.com/fvbommel/caddy-combine-ip-ranges"
|
||||||
|
_ "github.com/fvbommel/caddy-dns-ip-range"
|
||||||
|
_ "github.com/WeidiDeng/caddy-cloudflare-ip"
|
||||||
|
_ "github.com/zhangjiayin/caddy-geoip2"
|
||||||
|
_ "github.com/corazawaf/coraza-caddy"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
caddycmd.Main()
|
||||||
|
}
|
Loading…
Reference in a new issue