command module
v1.0.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2018 License: MIT Imports: 13 Imported by: 0



Quickly serve any FastCGI based application with no hassle.

Quick Overview

➜ http2fcgi --root /var/www/laravel-project/public --http :8000


➜  http2fcgi -h
Usage of http2fcgi:
  -ext comma separated list
        the fastcgi file extension(s) comma separated list (default "php")
  -fcgi string
        the fcgi backend to connect to, you can pass more fcgi related params as query params (default "unix:///var/run/php/php7.0-fpm.sock")
  -http string
        the http address to listen on (default ":6065")
  -index string comma separated list
        the default index file (default "index.php,index.html")
        whether to allow directory listing or not
  -root string
        the document root (default "./")
  -router string
        the router filename incase of any 404 error (default "index.php")
  -rtimeout int
        the read timeout, zero means unlimited
  -wtimeout int
        the write timeout, zero means unlimited


http2fcgi is a reverse proxy that will convert the standard http request to fcgi request so it can served by i.e php, python ... etc.


I wanted a production ready simple and tiny solution to serve some of my laravel based projects.


  • Using Docker ➜ docker run --network=host -v /var/www/site/public:/var/www/site/public -v /var/run/php/php7.0-fpm.sock:/var/run/php/php7.0-fpm.sock alash3al/http2fcgi -root /var/www/site/public -http :8085

  • Using Go ➜ go get


From your app you can ask http2fcgi to send a file with any size directly to the browser without any hassle in your app logic, just send a header X-SendFile: /full/path/to/file then let http2fcgi deal with it.


Mohammed Al Ashaal


MIT License


The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL