2024-07-26

caddy webserver configuration

Serving a static files like hugo from caddy webserver, with the below example

static file
https://domain1.in, https://www.domain1.in {
	root * /var/www/html/domain1
	file_server
}

where /var/www/html/domain1 is the location of the static files.

To serve a reverse_proxy for an application running in localhost on port 8085.

reverse proxy
https://domain-name.tld {
	reverse_proxy localhost:8085
}