I think you can use (x)inetd.
It's a linux wrapper, it listens to port X and calls an application everytime it gets a new connection.
The application will receive the HTTP requests in stdin. You'll need a parsing library to parse the request and generate a valid answer.
It's really old and deprecated technology but it's rather simple.