У меня после обновления #Nginx сломались некоторые #CGI-приложения, запущенные через #fcgiwrap. Все сломанные страницы выдавали ошибку 403 с сообщением "This page cannot be displayed".

Я полезла в error_log нгинкса и нашла там такое: "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?"

После сравнения бэкапов я поняла, в чем дело. В /etc/nginx/fastcgi_params добавили параметр SCRIPT_FILENAME, который все и сломал.

This morning's project: Play with a gemini server that supports FastCGI.

So far I've been playing with gmid ¹ and it looks pretty nice. I was able to get it up and running as a docker container on my laptop, tested protected paths and even got a couple of Python scripts to run as FastCGI with a second fcgiwrap ² container 🤓.

I am thinking about making a small bookmarks app for my bookmarks so I can add/edit them directly on the browser without having to edit and commit my bookmarks file manually. I might use a SQLite db.

A different approach would be to use Titan, but that is something I still need to figure out.

1: https://gmid.omarpolo.com/
2: https://github.com/gnosek/fcgiwrap#readme-ov-file

#GeminiProtocol #gmid #fcgiwrap #FastCGI #SelfHosted
home | gmid

Configure CGI executable Environment on Nginx

nginx + AWStats

AWStats 是個很老牌的分析工具,直接對 access log 分析後提供報表,本來以為是完全沒在動的專案,但從版本記錄發現 2020 年與 2023 年各有一版修安全性問題,看起來還是有在維護?

會想到要裝是因為這幾天被砍站,CPU credit 低到觸發我設定的 alarm:

除了處理外,也想快速看一下發生什麼事情,而這種砍站的在 JavaScript 類的分析服務上不會看到,需要直接對 server log 分析,所以就想到 AWStats 了...

Ubuntu 可以透過 sudo apt install -y awstats

https://blog.gslin.org/archives/2024/08/01/11918/nginx-awstats/

#Computer #DevOps #Murmuring #Network #Software #SRE #WWW #awstats #cgi #devops #fastcgi #fcgiwrap #nginx #perl #sre

nginx + AWStats

AWStats 是個很老牌的分析工具,直接對 access log 分析後提供報表,本來以為是完全沒在動的專案,但從版本記錄發現 2020 年與 2023 年各有一版修安全性問題,看起來還是有在維護? 會想到要裝是因為這幾天被砍站,CPU credit balance...

Gea-Suan Lin's BLOG