3 ms·
Apache is a web server that add parsers as modules (php). NGINX is a reverse proxy/web server that can proxy to other processes listening on other ports. (PHP-F
by rockerBOO 11y ago
Apache is a web server that add parsers as modules (php).
NGINX is a reverse proxy/web server that can proxy to other processes listening on other ports. (PHP-FastCGI running on port 3000).
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.
- dnotrael 11y agoVery 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?