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. Handles HTTP status codes: 200 (OK), 403 (Forbidden), 404 (Not Found). Prevents path traversal attacks. Logs requests cleanly with full HTTP headers. Defaults to serving index.html for root path requests. --- Requirements GnuCOBOL (cobc compiler). POSIX-compatible OS (Linux, macOS, BSD). make build tool. Installing GnuCOBOL macOS: Ubuntu/Debian: Fedora/RHEL: --- Building Clone or download the repository, then run: This compiles all modules and creates the webserver executable. To clean build artifacts: --- Usage Run from the directory you want to serve: The server starts on port 8080. Serves files from the current directory. Example Accessing the Server http://localhost:8080/ serves index.html from current directory. http://localhost:8080/filename.html serves specified file. http://localhost:8080/path/to/file.txt serves files in subdirectories. Stop server with Ctrl+C. --- Configuration To change the server port, edit config.cpy: Then recompile with make. --- Project Structure --- Supported MIME Types HTML: text/html CSS: text/css JavaScript: application/javascript JSON: application/json XML: application/xml Plain text: text/plain PNG: image/png JPEG: image/jpeg GIF: image/gif SVG: image/svg+xml ICO: image/x-icon PDF: application/pdf Additional types can be added in mime-types.cbl. --- Security Features Blocks path traversal attempts (requests with ..). Restricts access to current directory and subdirectories. Validates paths before file system access. --- Limitations Single-threaded: handles one request at a time. No SSL/TLS support. Maximum file size: 64KB. Only supports line sequential file organization (text files). No caching or compression. No range requests or partial content support. --- Troubleshooting Bind failed - check if port is in use: Another process uses port 8080; stop it or change port in config.cpy. Permission denied: Check file read permissions. File not found (404): Verify file exists in current directory, paths are case-sensitive. --- License Public domain - use freely. --- Acknowledgments Built with GnuCOBOL, demonstrating COBOL's capability for modern systems programming.