Can I create a CGI or small webserver

I would like to create a small CGI of webserver that will allow me to bridge my ajax web interface to control arduino systems.
Can anyone point me in the right direction as far as how I should approach setting this up?
I mean can I use the framework to create a CGI for my server, or do I need to create a custom webserver?

thanks in advance.

take a look at ofxHttpServer:

http://github.com/arturoc/ofxHttpServer

Thanks… I had not thought to check git for extensions (strange since I do this all the time for my web dev)
I will take a look.