Skip to content

Instantly share code, notes, and snippets.

@brunowego
Created November 22, 2019 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunowego/7397c4be85ca0ea7e09113f7761fe4a6 to your computer and use it in GitHub Desktop.
Save brunowego/7397c4be85ca0ea7e09113f7761fe4a6 to your computer and use it in GitHub Desktop.

FastCGI

CLI

Installation

Homebrew

brew install fcgi

YUM

yum check-update
sudo yum -y install fcgi

Commands

cgi-fcgi

Health Check

# PHPBrew
phpbrew fpm current

Examples

Simple

cgi-fcgi -bind -connect 127.0.0.1:9000

Test Ping and Status

# Ping
SCRIPT_NAME=/ping \
  SCRIPT_FILENAME=/ping \
  REQUEST_METHOD=GET \
  cgi-fcgi -bind -connect 127.0.0.1:9000

# Status
SCRIPT_NAME=/status \
  SCRIPT_FILENAME=/status \
  QUERY_STRING= \
  REQUEST_METHOD=GET \
  cgi-fcgi -bind -connect 127.0.0.1:9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment