Scripted CGI Server
This Repository contains a Dockerfile to build a lighttpd cgi webserver that can not only run php, but also nodejs or python scripts on request. It may be useful for quickly deploying and updating small scripts and being able to trigger them via your browser or curl.
Usage
Build the docker image
docker build -t cgi-server .
Run the container
docker run --restart unless-stopped -p 8080:80 -v /path/to/data:/var/www/html
Place either static .html files or script files (.py, .njs for nodejs or .php) in the data directory (mounted at /var/www/html
)
Custom error pages
To customize the error pages you could ...
- Change the template file
errorpage_template.html
before building the docker image - Mount a volume at
/var/www/error_pages/
, for example:
-v /path/to/error_pages:/var/www/error_pages
Languages
Dockerfile
50.3%
HTML
27.6%
Python
22.1%