Skip to content

Commit

Permalink
Setup lighttpd
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Jul 30, 2015
1 parent 48d83e2 commit 4acbc30
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

FROM alpine:3.2
MAINTAINER Daniel Nephin <dnephin@gmail.com>

RUN apk update && apk add lighttpd
ADD lighttpd.conf /etc/lighttpd/lighttpd.conf
CMD ["lighttpd", "-f", "/etc/lighttpd/lighttpd.conf", "-D"]
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

BUILD_ID ?= ${USER}


.PHONY: build
build:
docker build -t alpine-package-mirror:${BUILD_ID} .
81 changes: 81 additions & 0 deletions lighttpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
###############################################################################
# lighttpd.conf for running an alpine linux package mirror
#
# See http://wiki.alpinelinux.org/wiki/How_to_setup_a_Alpine_Linux_mirror
###############################################################################

# {{{ variables
var.basedir = "/var/www/localhost"
var.logdir = "/var/log/lighttpd"
var.statedir = "/var/lib/lighttpd"
# }}}


# {{{ modules
server.modules = (
"mod_access",
"mod_setenv",
"mod_accesslog"
)
# }}}

# {{{ includes
include "mime-types.conf"
# }}}

# {{{ server settings
server.username = "lighttpd"
server.groupname = "lighttpd"

server.document-root = var.basedir + "/htdocs"
server.pid-file = "/var/run/lighttpd.pid"

server.errorlog = var.logdir + "/error.log"

server.indexfiles = ("index.php", "index.html",
"index.htm", "default.htm")

# server.tag = "lighttpd"

server.follow-symlink = "enable"
# }}}

# {{{ mod_accesslog
accesslog.filename = var.logdir + "/access.log"
# }}}

# {{{ mod_dirlisting
# enable directory listings
dir-listing.activate = "enable"
#
# don't list hidden files/directories
dir-listing.hide-dotfiles = "enable"
#
# use a different css for directory listings
# dir-listing.external-css = "/path/to/dir-listing.css"
#
# list of regular expressions. files that match any of the
# specified regular expressions will be excluded from directory
# listings.
# dir-listing.exclude = ("^\.", "~$")
# }}}

# {{{ mod_access
# see access.txt

url.access-deny = ("~", ".inc")
# }}}

# {{{ mod_setenv
# see setenv.txt
setenv.add-response-header += ("Cache-Control" => "must-revalidate")
# }}}

# {{{ debug
# debug.log-request-header = "enable"
# debug.log-response-header = "enable"
# debug.log-request-handling = "enable"
# debug.log-file-not-found = "enable"
# }}}

# vim: set ft=conf foldmethod=marker et :

0 comments on commit 4acbc30

Please sign in to comment.