Apache2 and FastCGI

Linux specific forum
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Apache2 and FastCGI

Post 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
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: Apache2 and FastCGI

Post 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...
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
Post Reply