What’s caddy?

Caddy Server (or Caddy Web) is an open source, HTTP/2 enabled Web server written in Golang. It uses the Golang standard library to provide HTTP functionality.

The characteristics of the caddy fixings

Caddy fixings deployment

1. Install a PHP

The brew install [email protected]Copy the code

2. Install the caddy fixings

curl https://getcaddy.com | bash -s personal
Copy the code

3. Configure the Caddy file

Caddyfile

# Domain name resolution
# Caddy automatically helps with certificate application, HTTPS access, no configuration required
www.1019.fun {
    root /home/ubuntu/www.1019.fun
    log /home/ubuntu/www.1019.fun/access.log
    errors /home/ubuntu/www.1019.fun/errors.log
    
    # PHP-FPM Configuration for Caddy
    fastcgi / localhost:9000 php
}
# the IP way
:9001 {
    root /Users/shijl/GitBook/Library/Import/gbook1/_book
    log /Users/shijl/Downloads/gbook1_access.log
    errors /Users/shijl/Downloads/gbook1_errors.log

    # PHP-FPM Configuration for Caddy
    fastcgi / localhost:9000 php
}
Copy the code

4. Start the caddy fixings

Start in the Caddyfile directory

caddy
Copy the code

The official website

caddyserver.com