I wonder if it would be more efficient to skip httpd and implement the HTTP server directly in the app. It would be consistent with the idea of using C with very few dependencies, give a lot of flexibility, and avoid the overhead of CGI.
Implementing an HTTP server from scratch in C is quite simple, clients are harder though, so I would keep using libcurl.
HTTPS can be tricky though, so you probably want to delegate this part to a reverse proxy.
Implementing an HTTP server from scratch in C is quite simple, clients are harder though, so I would keep using libcurl.
HTTPS can be tricky though, so you probably want to delegate this part to a reverse proxy.