Webbol: A minimal static web server written in COBOL
Webbol
A minimal static web server written in COBOL using GnuCOBOL.
Features
- Serves static files from the current directory
- Automatic MIME type detection for common file types
- HTTP status codes: 200 (OK), 403 (Forbidden), 404 (Not Found)
- Path traversal attack prevention
- Clean request logging with full HTTP headers
- Defaults to
index.htmlfor root path requests
Requirements
- GnuCOBOL (cobc) compiler
- POSIX-compatible operating system (Linux, macOS, BSD)
- make
Installing GnuCOBOL
macOS:
Ubuntu/Debian:
sudo apt-get install gnucobol
Fedora/RHEL:
sudo dnf install gnucobol
Building
Clone or download the repository, then compile:
This will compile all modules and create the webserver executable.
To clean build artifacts:
Usage
Start the server from the directory you want to serve:
The server will start on port 8080 and serve files from the current directory.
