🎉 Initial Version

This commit is contained in:
2023-03-01 21:55:32 +01:00
commit a1b823c61f
5 changed files with 173 additions and 0 deletions

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# 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
```