Skip to content

Instantly share code, notes, and snippets.

@arbakker
Last active May 15, 2024 08:07
Show Gist options
  • Save arbakker/43f66095a820212f6133e5993159127d to your computer and use it in GitHub Desktop.
Save arbakker/43f66095a820212f6133e5993159127d to your computer and use it in GitHub Desktop.
Minimal lighttpd proxy configuration to run in Docker

README

Minimal lighttpd configuration example which proxies all HTTP traffic on localhost:80 to localhost:3333. To run in a Docker container execute:

sudo docker run --rm -t -v "$(pwd)/lighttpd.conf:/etc/lighttpd/lighttpd.conf" -p 80:80 sebp/lighttpd
server.modules = (
"mod_proxy"
)
server.username = "lighttpd"
server.groupname = "lighttpd"
server.pid-file = "/run/lighttpd.pid"
server.document-root = "/var/www"
server.errorlog = "/dev/pts/0"
$HTTP["host"] =~ "localhost" {
$HTTP["url"] =~ "^/.*" {
proxy.server = ( "" =>
((
"host" => "host.docker.internal",
"port" => 3333
))
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment