Cookbooks
haproxy
documentation
Haproxy Fastcgi

Back To Resource List (opens in a new tab)


haproxy_fastcgi

Fastcgi describes a FastCGI applications resource for haproxy to send HTTP requests to Responder FastCGI applications

Resource available when using HAProxy version >= 2.1.

Introduced: v8.2.0

Actions

  • :create
  • :delete

Properties

This resource also uses the following partial resources:

NameTypeDefaultDescriptionAllowed Values
fastcgiStringNoneName property - sets the fcgi-app name
docrootStringNoneDefine the document root on the remote host
indexStringNoneDefine the script name that will be appended after an URI that ends with a slash
log_stderrStringNoneEnable logging of STDERR messages reported by the FastCGI application
optionArrayNoneArray of HAProxy option directives

Examples

haproxy_fastcgi 'php-fpm' do
  log_stderr 'global'
  docroot '/var/www/my-app'
  index 'index.php'
  option ['keep-conn']
  extra_options('path-info' => '^(/.+\.php)(/.*)?$')
end

Generates

fcgi-app php-fpm
  docroot /var/www/my-app
  index index.php
  log-stderr global
  option keep-conn
  path-info ^(/.+\.php)(/.*)?$