Re:Ask HN: How, bottom to top, does a modern web application...
by dnotrael on Wednesday July 15, 2015 @12:49AM
(#9889768)
Very succinct answer! Thank you. I am still a bit confused as to what interface CGI exposes? Is it a way for a programming language to take a HTTP request? As in, PHP-FastCGI is an implementation in PHP of receiving the HTTP request as data, and then calling the appropriate handler in the application?
BROWSER -> NGINX (80) -> PHP-FastCGI (3000) -> NGINX -> BROWSER
NGINX can also proxy on sockets
BROWSER -> NGINX (80) -> PHP-FastCGI (/usr/socks/php.socks) -> NGINX -> BROWSER
CGI just defines the interface, and the language would be implementing the interface.