Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just curious to know, is there any other alternative to cgi/fastcgi?

share|improve this question
Your question is not clear! What do you mean by alternative here? – Khaled Nov 16 '10 at 8:47
For which scripting language? And why? Is there a particular disadvantage of cgi/fastcgi you're trying to leave behind? – ZoFreX Nov 16 '10 at 9:42
There is no disadvantage as such, i am exploring it and i do not have any experience with cgi. Was trying to figure out what else is available for use. – kalyan Nov 16 '10 at 10:50
up vote 1 down vote accepted

Depends what you want to do. Apache (by default) does not rely on CGI/FASTCGI to execute PHP, Perl or whatever code you want. It integrate the execution of the server side code inside its own processes. It's probably more simply, but also heavier.

So, if you question is: Is there an alternative to FASTCGI to execute server side code outside of the webserver process ? Then I believe the answer is no if you are coding in PHP, Perl or C.

share|improve this answer
Thanks, this helps. I just do not want endup doing something which is too outdated. – kalyan Nov 16 '10 at 10:52
Reply is a bit misleading: Apache does not have to rely on CGI/FASTCGI to run interpreters implemented as Apache modules. "...but also heavier" - in what way? There's only a disadvantage if the majority of the content is static then the memory footprint is a bit bigger than it needs to be (but these are ro TXT segments and therefore shared). – symcbean Nov 16 '10 at 13:08

FastCGI is language/web server agnostic transport protocol, only alternative is SCGI, which for some reason is not as-popular as FastCGI, despite being simpler and cleaner and not losing in performance.

For different programming language and web server combination there are (often) faster alternatives available:

  • For python there is WSGI, which is implemented by mod_wsgi on Apache / uwsgi on Nginx and countless python app servers.
  • For ruby there is Rack, which is implemented by passenger for Apache / nginx .
  • For PHP there is mod_php (which is slower and thread non-safe) for Apache
share|improve this answer
there's a lot of nonsense talked about PHP being non-thread safe: 7 years ago some PHP extensions were not known to be thread-safe. While several were updated quickly after that,I'm not aware of any outstanding issues - can you provide references? mod_php slower? Again - this is surprising news - can you provide references? – symcbean Nov 16 '10 at 13:12
As far as I see, PHP FAQ still says that it is not recommended to run PHP in threaded MPM in production enviroment - . – Kristaps Nov 16 '10 at 15:30
mod_php slowness - it consumes more memory, more MySQL connections, more network usage, and freeing more resources allows you to scale to more users :-) – Kristaps Nov 16 '10 at 15:36

If you're talking about PHP, there's mod_php for Apache.

share|improve this answer
I am looking for fastcgi with C – kalyan Nov 16 '10 at 10:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.