ソースを参照

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>
Gerard Alvear Porras 2 日 前
コミット
30968c4065
2 ファイル変更43 行追加1 行削除
  1. 1 1
      docs/en/admins/01_Index.md
  2. 42 0
      docs/en/admins/OpenBSD-httpd.md

+ 1 - 1
docs/en/admins/01_Index.md

@@ -32,6 +32,7 @@ Learn how to install, update, and backup FreshRSS, as well as how to use the com
 ### Web server configuration
 ### Web server configuration
 
 
 * [Apache/Nginx configuration files](10_ServerConfig.md)
 * [Apache/Nginx configuration files](10_ServerConfig.md)
+* [OpenBSD httpd](OpenBSD-httpd.md)
 * [Reverse proxy with Caddy](Caddy.md)
 * [Reverse proxy with Caddy](Caddy.md)
 
 
 ### Special server information
 ### Special server information
@@ -39,4 +40,3 @@ Learn how to install, update, and backup FreshRSS, as well as how to use the com
 * [Installation on Debian 9/Ubuntu 16.04](06_LinuxInstall.md)
 * [Installation on Debian 9/Ubuntu 16.04](06_LinuxInstall.md)
 * [Installation on cloud providers](14_CloudProviders.md)
 * [Installation on cloud providers](14_CloudProviders.md)
 * [Updating on Debian 9/Ubuntu 16.04](07_LinuxUpdate.md)
 * [Updating on Debian 9/Ubuntu 16.04](07_LinuxUpdate.md)
-

+ 42 - 0
docs/en/admins/OpenBSD-httpd.md

@@ -0,0 +1,42 @@
+# 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:
+
+```httpd
+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
+project’s [`.htaccess` file](https://github.com/FreshRSS/FreshRSS/blob/edge/p/.htaccess).
+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.