diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2023-01-07 18:47:22 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2023-01-07 18:47:22 +0100 |
| commit | 8686f8ad7833bfde2f6d038a572de6e70e567537 (patch) | |
| tree | de70b255f8a6829ea9c616e8990a3132540029f7 /guides | |
| parent | 806114b05461200a6d79422148b94c5b78ffae18 (diff) | |
| download | memory-leaks-8686f8ad7833bfde2f6d038a572de6e70e567537.tar.xz | |
Rant about CGI
Underachieving Hobbyist Laments How Hard It Is Nowadays To Let The
Internet Run Arbitrary Commands On His Server.
Diffstat (limited to 'guides')
| -rw-r--r-- | guides/cloud/vps.org | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/guides/cloud/vps.org b/guides/cloud/vps.org index 4315c44..1fcf1ca 100644 --- a/guides/cloud/vps.org +++ b/guides/cloud/vps.org @@ -170,3 +170,19 @@ $ sudo systemctl restart nginx # Make fail2ban notice the new log file. $ sudo systemctl restart fail2ban #+end_src + +** CGI +I like the idea of [[https://en.wikipedia.org/wiki/Common_Gateway_Interface#Using_CGI_scripts][CGI "scripts"]], i.e. having the web server fire a +program to handle requests: + +- URI bits are passed through environment variables and stdin; +- the program spits the page on stdout. + +Had some fun toying with Python's ~cgi~ module; sadly though the +project has [[https://peps.python.org/pep-0594/#cgi][decided to deprecate it]]. The docs [[https://docs.python.org/3.11/library/cgi.html][suggest some migration +paths]], and there's a [[https://pypi.org/project/legacy-cgi/][legacy-cgi package on PyPI]] if I really want to +keep using it I guess. + +Also nginx has no support for CGI either, though their documentation +explains how to combine their FastCGI support with ~fcgiwrap~ to +enable CGI scripts. |
