2024-01-09 15:51:13 +00:00
2023-03-01 21:55:32 +01:00
2023-03-01 21:55:32 +01:00
2023-03-01 21:55:32 +01:00
2024-01-09 15:51:13 +00:00
2023-03-01 21:55:32 +01:00
2023-03-01 21:55:32 +01:00

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 ...

  1. Change the template file errorpage_template.html before building the docker image
  2. Mount a volume at /var/www/error_pages/, for example:
-v /path/to/error_pages:/var/www/error_pages
Description
A simple Nginx based CGI server, running PHP, Python and Node.js scripts
Readme 40 KiB
Languages
Dockerfile 50.3%
HTML 27.6%
Python 22.1%