Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

Caddy 2 - The Ultimate Server with Automatic HTTPS
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

Caddy Web Server support almost features needed for a web server

  • File Server with Browse option
  • Host HTML web
  • Host any self host web such as .NET Core as a Reserve proxy with high performance
  • Host a static content
  • Load balancer
  • and so on...

The specialties of Caddy Web Server is Auto (and Auto Renew) HTTPS

  • You just need deploy your website in Caddy and it auto generate and apply HTTPS with auto redirect HTTP to HTTPS rule for you.
Welcome - Caddy Documentation
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

Start with Caddy

  • Install Caddy
  • Create Caddy Web Server configuration via a Caddyfile (Caddyfile without any extension)
{
	# This is config the port of "Admin Port" for Caddy Server
    admin 0.0.0.0:2015
	
	# enable (default) or disable http -> https rule
    # auto_https disable_redirects
}

# example.com is a HTML project (index.html)
example-html.com {
    root * <path to folder>
    
    # remove browse if you don't like end-user explore your folder via web browser
    file_server browse
}

# Config a website localhost:8080 and hard response a content
:8080 {
	respond "Hello, world!"
}

example-dotnet.com {
    # example the dotnet core app running in port 5000
    reverse_proxy 127.0.0.1:5000
}
  • Check more config and concept of Caddyfile via here
  • caddy adapt <path to Caddyfile> (Point the config file to Caddy Server. if pointed before, ignore)
  • caddy start (If caddy not start yet. If started, ignore)
  • caddy reload (it mean load the adapt / new config)