Nginx-CGI brings support for CGI to Nginx and angie

https://news.ycombinator.com/rss Hits: 13
Summary

nginx-cgi plugin Brings CGI support to Nginx and Angie webserver. OS Tested with Nginx Angie Linux AlmaLinux 9, Debian 12 and Ubuntu 24.04/20.04 okay okay Darwin MacOS 15.1 okay okay BSD FreeBSD 14.2 and OpenBSD 7.6 okay okay Solaris OmniOS r1510521 okay okay Windows No plan, nginx barely supports Windows Before everything CGI is neither a demon nor an angel. It is simply a tool. Just like a chef's knife in the hands of a cook or a sword in the hands of a warrior, you won't use a sword for cooking, nor you take a chef's knife to the battlefield. The same goes for CGI, it has its appropriate scenarios, and it should not be misused or demonized. CGI is good for: Low frequency applications, such as system management Resource limited systems, such as embeding system Low budget projects, such as personal websites Prototyping, for fast iterate CGI is bad for: High QPS High traffic High concurrency I created a discord channel. If: You are also a fun of CGI If you have any problem with nginx-cgi If you want to get update of nginx-cgi If you want to know more friends Please join us: https://discord.gg/EJSfqHHmaR. Quick start (with Debian 12+, Ubuntu 24.04+) Build and install: # checkout source code git clone https://github.com/pjincz/nginx-cgi cd nginx-cgi # build deb package ./build-deb-package.sh # install built package dpkg -i ../libnginx-mod-http-cgi_ * _amd64.deb Then enable cgi in nginx. If you have a newly installed nginx, you can find a default site at /etc/nginx/sites-enabled/default . The default one looks like this: server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location / { try_files $uri $uri/ =404; } } The default root points to /var/www/html , keep it as it as, and add following section after location / section. location /cgi-bin { cgi on; } The newly added section means, for all request under /cgi-bin , turns on cgi support. Now restart nginx: systemctl r...

First seen: 2025-08-30 01:38

Last seen: 2025-08-30 13:39