Page 1 of 1

Apache2 and FastCGI

Posted: Sun May 29, 2016 10:34 pm
by bbanelli
Greetings,

can anyone give small proof of concept how one should easily and successfully deploy Apache2 with necessary configuration to run and debug(!) FastCGI applications? Ubuntu preferred, but I suppose any Linux distribution should do. I mostly find all related to PHP and I'm not sure how to set it up for PureBasic's FCGI.

TIA!

Bruno

Re: Apache2 and FastCGI

Posted: Mon May 30, 2016 11:25 pm
by bbanelli
What I'm actually trying to achieve is running FCGI on CPanel Apache2 server. So far, I've tried the following:

Code: Select all

RewriteCond %{SERVER_PORT} !^5600$
RewriteRule ^fcgi/(.*[^/])/?$ http://%{HTTP_HOST}:5600/fcgi/$1/ [R=301,L]

Code: Select all

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com/fcgi$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.com/fcgi$
RewriteRule ^.*$ "http\:\/\/127\.0\.0\.1\:5600%{REQUEST_URI}" [P,QSA,L]

Code: Select all

RewriteEngine on
ProxyPass /fcgi/ fcgi://127.0.0.1:5600/
ProxyPassReverse /fcgi/ fcgi://127.0.0.1:5600/
Order deny,allow
Allow from all
But /fcgi/ folder keeps being on port 80.

Any clue?

With my very best,

Bruno

Edit: it seems that it was not a problem with Apache2 but with LiteSpeed (it's commercial drop-in replacement). Will update if I resolve this matter, might help someone in future...