There is a third option, which doesn’t involve making your small application responsible for reinventing the wheel.
Take whatever is pushing the site over the wire (nginx, Apache, lighthttpd) and use its public APIs to implement your web application.
You can make your nginx.conf list the routes along with the C functions for each route, which nginx looks up in your shared library.
You can host numerous web apps just by updating adding an .so and updating the nginx conf.
This is also structurally more efficient your hand rolled web server which in all likelihood has to reverse proxy via nginx anyway.