Files
FreshRSS/docs/en/admins/OpenBSD-httpd.md
Gerard Alvear Porras 30968c4065 Document OpenBSD httpd API configuration (#9061)
* Document OpenBSD httpd API configuration

Closes #7493. Adds an OpenBSD httpd example for FreshRSS with PATH_INFO preserved for the Google Reader API. 

* Document caching considerations for OpenBSD httpd

* A few edits

---------

Co-authored-by: Gerard Alvear <gerard.alvear@logiqd.me>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-07-20 18:02:10 +02:00

1.4 KiB
Raw Permalink Blame History

OpenBSD httpd configuration

OpenBSD httpd(8) does not use .htaccess files. The following example serves the public p/ directory and passes the Google Reader API path to PHP-FPM with PATH_INFO preserved:

server "rss.example.net" {
	listen on * tls port 443
	root "/var/www/htdocs/FreshRSS/p"

	tls certificate "/etc/ssl/rss.example.net.fullchain.pem"
	tls key "/etc/ssl/private/rss.example.net.key"

	location match "^/api/greader\\.php(/.*)?$" {
		fastcgi socket "/run/php-fpm.sock"
		fastcgi param PATH_INFO "/api/greader.php"
	}

	location match "^/(.*\\.php)(/.*)?$" {
		fastcgi socket "/run/php-fpm.sock"
		fastcgi param SCRIPT_FILENAME "/var/www/htdocs/FreshRSS/p/$1"
		fastcgi param PATH_INFO "$2"
	}
}

Adjust the document root, PHP-FPM socket, and certificate paths for the local installation. Set FreshRSS base_url to the public HTTPS URL, then verify the API endpoint at /api/greader.php.

The PATH_INFO parameters are important: FreshRSS uses the path after greader.php to route Google Reader API requests.

HTTP caching

Unlike the bundled Apache configuration, OpenBSD httpd does not read the projects .htaccess file. Confirm the HTTP cache policy of the server or reverse proxy used in front of FreshRSS: static assets such as CSS, JavaScript, fonts, and images should be cached, but do not cache PHP pages or API responses.