This article has multiple issues. Please help improve it or discuss these issues on the talk page . (Learn how and when to remove these template messages)
|
Original author(s) | Matthew Holt |
---|---|
Initial release | 28 April 2015 |
Stable release | |
Repository | github |
Written in | Go [2] |
Operating system | BSD variants, Linux, Plan 9, macOS and Windows |
Platform | IA-32 (i386), x86-64, ARM, MIPS, S390X |
Type | Web server, reverse proxy server |
License | Apache 2 |
Website | caddyserver |
Caddy is an extensible, cross-platform, open-source web server written in Go.
The name "Caddy" refers both to a helper for tedious tasks, and a way to organize multiple parts into a simplified system. [3] At its core, Caddy is an extensible platform for deploying long-running services ("apps") using a single, unified configuration that can be updated on-line with a REST API. [4] Official Caddy distributions ship with a set of standard modules which include HTTP server, TLS automation, and PKI apps. [5] It is best known for its automatic HTTPS features. [6] [7]
Caddy is organized into three main components: a command, the core library, and configuration modules. [8] The command is the extensible interface by which the program is executed; it can also load configuration files, run common modes, manage installed plugins, and offer relevant utility functions. The core library has APIs for loading, unloading, and managing configuration; but it does nothing particularly useful on its own. Most of Caddy's functionality is provided by modules, which are plugins that extend Caddy's configuration structure; for example, the HTTP server is a module. [9] Caddy modules implement various long-running services, web standards, and other useful features.
Caddy's input is a JSON configuration document [10] which is received through an open socket via a RESTful HTTP API. [11] [6] In the absence of an HTTP client, Caddy's command-line interface can be used to load configuration files. [12] Config adapters may be used to convert other configuration formats to JSON. Existing adapters include the Caddyfile, which has first-class support in the command line; and YAML, TOML, Nginx, and several other formats. [13] [6]
When a configuration is received through its administration socket, Caddy decodes the configuration for all the specified modules, and starts running all the app modules. [6] When the app modules are being provisioned, they themselves may load and provision modules that they use. For example, the HTTP server is an app module which uses HTTP handler modules to handle HTTP requests; these handlers might use yet other modules to implement their functionality, and so on. [14] All these modules are provisioned during the config load phase. [8]
Plugins are installed by statically compiling them directly into the Caddy binary. [3] [6] Without plugins, Caddy's native configuration structure only has some basic options for administration and logging. [10] All other functionality must be provided by app modules. Official Caddy distributions ship with dozens of standard modules; [5] others can be added from the project's website, [15] using the xcaddy
command line tool, or by manually compiling a custom build. [16]
Miek Gieben forked Caddy to use as the core of CoreDNS, now a project of the Cloud Native Computing Foundation, as he appreciated its overall architecture and simplicity of its configuration. [17]
The HTTP server is an app module that comes standard with official Caddy distributions. [9] It is primarily used as a static file server [18] and load-balancing reverse proxy. [19] While the basis of Caddy's HTTP features use the implementation found in Go's standard library, [20] a variety enhancements and customizations are available as middleware and exposed through configuration parameters: [6]
By default, TLS is used automatically if any routes have a non-empty host matcher. [21] These are assumed to be site names or IP addresses that Caddy is serving, so Caddy will automatically procure and renew certificates for the configured hostnames and IP addresses. When automatic HTTPS is activated in this manner, Caddy will also redirect HTTP requests to their equivalent HTTPS location.
Caddy version 2 was released on May 5, 2020. [7] Reviewers say that it still has a simpler configuration file syntax than the Apache Web Server, although version 2's configuration format is largely incompatible with the previous major release of Caddy. [7] [22]
YAML(see § History and name) is a human-readable data serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. YAML targets many of the same communications applications as Extensible Markup Language (XML) but has a minimal syntax that intentionally differs from Standard Generalized Markup Language (SGML). It uses both Python-style indentation to indicate nesting, and a more compact format that uses [...]
for lists and {...}
for maps but forbids tab characters to use as indentation thus only some JSON files are valid YAML 1.2.
In computing, configuration files are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system settings.
Webmin is a web-based server management control panel for Unix-like systems. Webmin allows the user to configure operating system internals, such as users, disk quotas, services and configuration files, as well as modify and control open-source apps, such as BIND, Apache HTTP Server, PHP, and MySQL.
The Web Server Gateway Interface is a simple calling convention for web servers to forward requests to web applications or frameworks written in the Python programming language. The current version of WSGI, version 1.0.1, is specified in Python Enhancement Proposal (PEP) 3333.
JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a common data format with diverse uses in electronic data interchange, including that of web applications with servers.
Nginx is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Russian developer Igor Sysoev and publicly released in 2004. Nginx is free and open-source software, released under the terms of the 2-clause BSD license. A large fraction of web servers use Nginx, often as a load balancer.
Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.
Spring Roo is an open-source software tool that uses convention-over-configuration principles to provide rapid application development of Java-based enterprise software. The resulting applications use common Java technologies such as Spring Framework, Java Persistence API, Thymeleaf, Apache Maven and AspectJ. Spring Roo is a member of the Spring portfolio of projects.
CommonJS is a project to standardize the module ecosystem for JavaScript outside of web browsers.
An application programming interface (API) is a way for two or more computer programs or components to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build or use such a connection or interface is called an API specification. A computer system that meets this standard is said to implement or expose an API. The term API may refer either to the specification or to the implementation. Whereas a system's user interface dictates how its end-users interact with the system in question, its API dictates how to write code that takes advantage of that system's capabilities.
Mojito is an environment agnostic, Model-View-Controller (MVC) web application framework. It was designed by Ric Allinson.
Leaflet is an open source JavaScript library used to build web mapping applications. First released in 2011, it supports most mobile and desktop platforms, supporting HTML5 and CSS3. Among its users are FourSquare, Pinterest and Flickr.
Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management. Originally designed by Google, the project is now maintained by the Cloud Native Computing Foundation.
Webpack is a free and open-source module bundler for JavaScript. It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included. Webpack takes modules with dependencies and generates static assets representing those modules.
A progressive web application (PWA), or progressive web app, is a type of application software delivered through the web, built using common web technologies including HTML, CSS, JavaScript, and WebAssembly. It is intended to work on any platform with a standards-compliant browser, including desktop and mobile devices.
Grunt is a JavaScript task runner, a tool used to automatically perform frequent tasks such as minification, compilation, unit testing, and linting. It uses a command-line interface to run custom tasks defined in a file. Grunt was created by Ben Alman and is written in Node.js. It is distributed via npm. As of October 2022, there were more than 6,000 plugins available in the Grunt ecosystem.
The Redfish standard is a suite of specifications that deliver an industry standard protocol providing a RESTful interface for the management of servers, storage, networking, and converged infrastructure.
Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.
{{cite book}}
: CS1 maint: location missing publisher (link)