The conectiva Linux distro had a programmer that wrote a book on Shell Script in which he implemented a bash server, but as apache cgi scripts.
I learned to properly program with that book
https://www.amazon.com.br/Script-Profissional-Aurelio-Marinh...