Skip to content
a quick & tiny http to fast-cgi reverse proxy, let's serve our php,python ... etc apps with no hassle!
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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.


  • Binary, go to the releases page.

  • 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

You can’t perform that action at this time.