mod_fastcgi(4gx)

πŸ“¦
version 3.6 Β· 2 versions
, in alpine 3.24

πŸ’– mod_fastcgi(4gx) πŸ’–

okay so this page is mod_fastcgi(4gx), direct from the Gromox admin references, and it’s literally about making FastCGI servers go brrr behind http(8gx). πŸ¦‹

πŸŽ€ Name πŸŽ€

  • mod_fastcgi β€” http(8gx) handler for proxying requests to FastCGI servers.

🌸 Description 🌸

mod_fastcgi can forward HTTP requests to one or more FastCGI servers when certain URIs are requested. Take special note of the file suffix column documented below; in particular, to override an entire directory, you may also need to edit the table for mod_cache(4gx). Don’t skip that part, bestie β€” it’s giving β€œimportant detail.”

✨ Configuration directives ✨

This component shares http.cfg. See http(8gx).

πŸ—ΊοΈ URI map πŸ—ΊοΈ

The filemap that specifies which URIs to handle is fastcgi.txt, which is searched for in config_file_path. The usual location is /etc/gromox/fastcgi.txt.

Each line in this file consists of 7 columns separated by whitespace:

  1. Domain or asterisk-based wildcard ("*", "*.example.com") to match the HTTP Host: request header with.
  2. URI path (prefix) to match.
  3. Mapped path that will be passed to the FastCGI executor. Note that the FastCGI process may additionally have a document root setting that could map the path one more time.
  4. File suffix (without dot) to match on, e.g. php.
  5. A file to use as the default file for a directory (similar to Apache httpd's DirectoryIndex).
  6. A set of headers, separated by the pipe symbol |, which should be forwarded to the CGI handler. In absence of any desired extra headers, a single pipe can be used to fill the column.
  7. Socket path: an AF_LOCAL socket path to make the FastCGI request to.

If the file has no lines, no documents will be served this way. If the file is absent however, a set of default entries will be used.

πŸ¦‹ Default entries πŸ¦‹

* /sync /usr/share/grommunio-sync php index.php | /run/php-fpm/php-grommunio-sync-fpm.sock
* /web /usr/share/grommunio-web php index.php | /run/php-fpm/php-grommunio-web-fpm.sock
* /dav /usr/share/grommunio-dav php index.php | /run/php-fpm/php-grommunio-dav-fpm.sock
NOTE: The path designated for FPM sockets varies between distributions, and because some distributions also have security policies that involve path matching (e.g. via AppArmor), we are unable to choose a path that works out-of-the-box on all distro-provided platform configurations without fail. /run/php-fpm is used as the default in line with the Grommunio Appliance. That’s the whole tea β˜• β€” distro paths are not one-size-fits-all.

πŸŽ€ Files πŸŽ€

  • config_file_path/fastcgi.txt β€” Map specifying with paths mod_fastcgi should react to, and which FastCGI backend to route requests to.

🌈 See also 🌈


Mwah πŸ’‹ β€” source/version: Gromox, page mod_fastcgi(4gx). Date: the footer didn’t give one, so we’re not inventing one, bestie. 🫢

πŸ“¦ where this page comes from