Skip to content

DuSTman31/FastCGI-Proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

 Proxy for FastCGI

Rationale

  Some fastcgi executables, such as HHVM or php-fpm, are intended to be run as a daemon system startup. However, web servers that use fastcgi, such as Apache with mod_fcgid, expect to run a program as a sub-process to handle fastcgi traffic. 

  To allow mod_fcgid to connect to a background fastcgi daemon, I created a small proxy process. This would be something that mod_fcgid could run, and would relay the fastcgi traffic to an existing daemon on port 9001. 

  This proxy would ideally be very low resource usage, so the resource usage of doing it this way should be negligible under most loads..

How to build

  Simply execute "make". You will need a c++ compiler installed on your system. This will create an executable called "prox" which you can specify as your FcgidWrapper field in your apache configuration.

  If you want to connect to a daemon on something other than port 9001, you will need to edit the prox.cpp file prior to compilation. There is an option to connect to a UNIX domain socket instead, should your HHVM/php-fpm daemon be on one of those. 

To Do

  Take port/unix socket address to connect to from command line.

About

Proxy FastCGI traffic from mod_fcgid to a daemon.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published