3 ms·
Yes but the poster, above, is complaining about using CGI with a server. My question is, if you're not using CGI/fastCGI with Apache or nginx for example, what
by sureaboutthis 8y ago
Yes but the poster, above, is complaining about using CGI with a server. My question is, if you're not using CGI/fastCGI with Apache or nginx for example, what is he suggesting should be used instead?
- delinka 8y agoOk, lemme spell it out: bundling the app and the server together; that’s what’s implied.
- sureaboutthis 8y agoWhich comes back to my question. Can one do that with apache and nginx? I'm pretty sure I've seen methods for this in Apache but only the paid version of nginx. Am I wrong?
- delinka 8y agoI mentioned Apache modules in my comment. Write a module, add it to Apache’s config, your code loads with the web server. Looks like one can also write nginx modules, but I’m not familiar with nginx licensing to know if a purchase is required to use that in a commercial deployment.
- icebraining 8y agoIt's not required, and in fact there's a big open source project taking advantage of that: OpenResty uses a module that loads LuaJIT into Nginx, and builds very fast applications into Nginx using Lua.
- aasasd 8y agoToday, app servers are mostly separated from front-end servers because, it turns out, it's best to not hold on to too much memory and/or threads while waiting for a slow client to receive their stuff. So async servers like Nginx are used on the front tier and they knock to app servers over the net. But Nginx does have a Lua module, and, I think, Perl. Afaik both are in the free version. Mostly used to augment configuration, or for lightweight interfacing directly with databases (ahem Redis and Memcached cough).
- marktangotango 8y agoUsing your language of choice: You open a socket on a port, listen for connections, when connection from client arrives read bytes from the socket, parse http request from those bytes, do something that may yield bytes in response, write the response bytes to the socket, close the socket (optional). https://beej.us/guide/bgnet/ https://beej.us/guide/bgnet/
- sureaboutthis 8y agoI asked about how to do this through apache or nginx. I know how to do it as you suggest.