Sign inSign up

zetaplusae/lighttpd-cgi

By zetaplusae

Updated about 6 years ago

An out-of-the-box lighttpd image for CGI scripts based HTTP server

Image
0

1.3K

zetaplusae/lighttpd-cgi repository overview

lighttpd-cgi

An out-of-the-box lighttpd image for CGI scripts based HTTP server.

This image is available on the Docker Hub zetaplusae/lighttpd-cgi, and can be pulled from the official Docker registry:

docker pull zetaplusae/lighttpd-cgi

How to use this image

Run directly
docker run -d -p 80:80 -v "$PWD":/var/www/cgi-bin zetaplusae/lighttpd-cgi

By running the command above, a HTTP server will be started on port 80. It will serve requests by executing CGI scripts on the same path as the one located under the /var/www/cgi-bin directory, which can be mounted externally. For instance, http://hostname/hello.sh will be served by /var/www/cgi-bin/hello.sh.

Build an image

Copy all your CGI scripts to the cgi-bin directory.

FROM zetaplusae/lighttpd-cgi
COPY ./cgi-bin/ /var/www/cgi-bin/

Configuration

The configuration file lighttpd.conf is located on /etc/lighttpd/lighttpd.conf. To customize the configuration, COPY your configuration to that path.

COPY ./your-lighttpd.conf /etc/lighttpd/lighttpd.conf

Or, instead of overwriting the main configuration file, you can copy a configuration to the directory /etc/lighttpd/conf.d/, where all files having suffix .conf will be included automatically.

See the lighttpd configuration wiki for more information.

License

This project is licensed under the MIT license.

Tag summary

Content type

Image

Digest

Size

7.1 MB

Last updated

about 6 years ago

docker pull zetaplusae/lighttpd-cgi