FastCGI is an open interface web servers can use to execute applications in a secure and isolated manner.

learn more… | top users | synonyms

25
votes
3answers
7k views

Apache vs Nginx

I have been investigating the differences between Apache and Nginx recently and am confused about which I should choose. I have done some searching but there is no definitive comparison between the ...
20
votes
3answers
7k views

PHP: What are the advantages of FastCGI over mod_php?

It was recently suggested to me that I use FastCGI with PHP. Now I went to the FastCGI page and read it but I don't really understand what the advantages are.
19
votes
1answer
2k views

Recommended Nginx + WSGI Configurations

Please explain pros/cons when using the different Nginx WSGI interfaces? Please explain in detail what differentiates each configuration? Which configuration should scale the best? If relevant, what ...
13
votes
1answer
5k views

Multiple php versions simultaneously on Ubuntu

I want to be able to run multiple php versions on my development box running Ubuntu 12.04. What I want to accomplish is that when I use localhost as domain a default is used (let's say php 5.3.17). ...
12
votes
7answers
57k views

Nginx + php-fpm “504 Gateway Time-out” error with almost zero load (on a test-server)

After debugging for 6-hours - I am giving this up :| We have a nginx+php-fpm+mysql in LAN with almost 100 wordpress (created and used by different designers/developers all working on test wordpres ...
10
votes
2answers
21k views

How to enable error log in lighttpd properly?

I have a Centos 5 system with Lighttpd and fastcgi enabled. It does log access but does not log errors. I have Internal Server Error 500 and no info in log and when I try to open not -existing file ...
10
votes
2answers
3k views

Should I impersonate PHP via FastCGI?

I am installing the latest version of PHP onto IIS 7.5 via FastCGI, and all of the instructions say that FastCGI should impersonate the calling client by setting fastcgi.impersonate = 1 If my ...
9
votes
4answers
15k views

nginx + PHP-FPM = “permission denied” error 13 in nginx log; configuration mistake?

I've got nginx 0.7x + PHP-FPM running under PHP 5.2.10 on one RHEL5 server, but trying to duplicate that setup under the bundled-in PHP-FPM in PHP 5.3.3 on a second server, I'm having some trouble ...
9
votes
3answers
31k views

nginx fastcgi “Primary script unknown” when configuring userdir

I hate configuring nginx. It's so complicated. How do I get PHP to work in my user dirs? Here's the relevant part of my nginx.conf: location ~ ^/~(.+?)(/.*)?$ { autoindex on; ...
9
votes
3answers
977 views

nginx + fastCGI + Django - getting data corruption in the responses sent to the client

I am running Django behind nginx using FastCGI. I have discovered that in some of the responses sent to the client, random data corruption is occurring in the middle of the responses (might be a ...
7
votes
3answers
25k views

What is wrong in my php-fpm configuration?

I have a 64-bit server but only 256MB of RAM. So, I moved to nginx server with fast-cgi to connect to PHP. I have PHP 5.3.6 running. The issue is that after every two or three days when I try to ...
7
votes
2answers
3k views

Error When Installing PHP5 on IIS6

I am trying to install PHP on my Windows Server 2003 machine that is using IIS6. I followed this guide for installing it, including using the binaries of fastCGI. I think I did everything correctly, ...
7
votes
4answers
3k views

How do I setup Apache with FastCGI and Ruby?

I've been reading alot of forum posts, tutorials, etc., about setting up apache under linux with fastcgi. I'm trying to run fcgi for some of my ruby development (not rails), but I figure it should ...
6
votes
8answers
21k views

Performance of IIS+ASP.NET vs (NGINX + FastCGI + Mono or XSP)?

How much requests each can handle? How many RAM needed? As I remember FastCGI are opened initialized processes, each can handle one request. What about multithreading?
6
votes
4answers
2k views

What Apache/PHP configurations do you know and how good are they?

I wanted to ask you about PHP/Apache configuration methods you know, their pros and cons. I will start myself: ---------------- PHP as Apache module---------------- Pros: good speed since you don't ...
6
votes
3answers
2k views

SCGI or FastCGI - What do you prefer? [closed]

I was doing some research (googling) on the subject, but all I could find were 2-3 year old posts. I'm interested in today's situation. Which do you prefer and why?
6
votes
6answers
3k views

PHP-CGI Started Serving Blank Pages

My PHP-CGI started serving blank pages for no apparent reason until I restarted the process. I want to know why. Unfortunately the "production" configuration file of PHP has no error_log by default. ...
6
votes
4answers
755 views

Apache Never runs after configuring eAccelerator and FastCGI

I recently configured accelerator and fastcgi with apache using: http://secure-ubuntu-server.blogspot.com/2009/07/howto-performance-tuning-of-lamp-and.html Now my Apache never starts. Logs shows: ...
6
votes
1answer
268 views

Htaccess application/type with PHP as FastCGI

Is there a way to use .htaccess with PHP as CGI/FastCGI? I would like to be able to have other extensions open as PHP. I have tried the following: AddType application/fcgid-script .phpd AddHandler ...
5
votes
1answer
2k views

Unable to set php_value in .htaccess file

I am trying to set up NewRelic on my Apache2/PHP server, and have it report different applications per vhost. To do this, the php value newrelic.appname must be changed. It is defined by default in ...
5
votes
3answers
6k views

Configure FastCGI for Python

I have nginx running on a VM and I want to run a Trac site. I need to run a python FastCGI server, but I cannot tell which is the server to use. I have found the following: Lighttpd spawn-fcgi But ...
5
votes
1answer
5k views

Enabling APC causes internal server error

After installing and enabling APC 3.1.9 (Alternate PHP Cache), using pecl, i ran into an internal server error. I checked my error logs, and this is what shows up. Error Logs: PHP Fatal error: PHP ...
5
votes
3answers
4k views

Nginx & PHP caching: fastcgi_cache, proxy_cache, APC or memcached or combo?

We have webservers running nginx 7.65 along with fastcgi PHP5 and are looking into caching possibilities to speed up content delivery and lower system loads. The servers run different (custom) ...
5
votes
1answer
5k views

Nginx + PHP-FPM = “Random” 502 Bad Gateway

I am running Nginx and proxying php requests via FastCGI to PHP-FPM for processing. I will randomly receive 502 Bad Gateway error pages - I can reproduce this issue by clicking around my PHP websites ...
4
votes
1answer
3k views

Mono 2.11 on nginx using fastcgi-mono-server4 will not work

I have mono 2.11 set up with my nginx 1.0.15 webserver running on centos 6.2. I built it from source and xps2, xps4 and fastcgi-mono-server2 work as expected. The problem is when I try and run ...
4
votes
3answers
3k views

Nginx fastcgi problems with django (double slashes in url?)

I'm deploying my first django app. I'm familiar with nginx and fastcgi from deploying php-fpm. I can't get python to recognize the urls. I'm also at a loss on how to debug this further. I'd welcome ...
4
votes
4answers
507 views

FastCGI launcher

I need to serve some FCGI scripts (via WSAPI, but that is irrelevant) from nginx. Currently I'm using spawn_fcgi to do this. This is the only solution I've found. I need to know my other options. ...
4
votes
3answers
7k views

Can Nginx handle php (or similar fcgi) requests inside of an alias?

I am converting a legacy Apache server to Nginx and do not have the luxury of changing URL's or rearranging the filesystem. Is it possible to use nested location{} blocks in the Nginx configuration ...
4
votes
1answer
2k views

Where to set “PHP_FCGI_MAX_REQUESTS” (lighttpd)

I want to setup the max requests to keep my system RAM from filling up when there is a memory leak. But I dont know where it is.
4
votes
1answer
516 views

Django VPS Configuration

I'm looking to run some Django sites on my VPS, with nginx acting as a front-end for it. I've been having some issues with mod_python and Apache, the site just starts erroring out whenever the traffic ...
4
votes
2answers
2k views

Better webserver performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi

I am currently running a high-traffic python/django website using Apache and mod_wsgi. I'm hoping that there's a faster webserver configuration out there, and I've heard a fair number of ...
4
votes
2answers
7k views

How to run PHP files as another user with Apache and FastCGI?

As per older questions, such as using mod_fcgid instead of mod_php and PHP as CGI or Apache Module? (and tangentially some other questions) I came to an understanding that running PHP as CGI or ...
4
votes
1answer
28 views

How are files being added to site as apache, when site is running as FastCGI?

I have a web server that is running many different sites (standard vhosts setup, most sites are Joomla based, a few wordpress and other non-CMS sites) in a Parallels Automation 11.5 environment. The ...
4
votes
2answers
783 views

Why is the response truncated at 16k with php + fastcgi?

I've got PHP 5.3.3 and nginx 0.8.47 compiled from source running a Wordpress blog. The RSS feed generated by Wordpress was getting truncated at roughly 16k (including header was 16k+90b). By adding ...
4
votes
2answers
10k views

nginx 502 bad gateway - fastcgi not listening? (Debian 5)

I have experience with nginx but it's always been pre-installed for me (via VPS.net pre-configured image). I really like what it does for me, and now I'm trying to install it on my own server with ...
3
votes
2answers
5k views

nginx: multiple document roots with fastcgi

When using a single document root in my http directive, everything works fine. However, I want to add a location directive with an additional directive and I can't get fastcgi to work with this ...
3
votes
1answer
2k views

Nginx + Django + FastCGI WSGI error? (Non fatal)

Hi everyone I am running django on top of nginx with fastcgi. When i do runfcgi, I am seeing these errors: python manage.py runfcgi daemonize=false host=127.0.0.1 port=8000 WSGIServer: missing ...
3
votes
5answers
15k views

'No Input file specified' error - NginX / fcgi - when requesting non-existant .php file

I have NginX serving a drupal site using fcgi. Attempting to browse to a non existent php file (eg. www.example.com/this-file-doesn't-exist.php) results in a white screen with this error: 'No Input ...
3
votes
2answers
7k views

how to start/restart fastcgi process?

I'm running nginx, and fastcgi to run a wordpress blog. After a while of running, I am getting 502 bad gateway errors. If i reboot the server things work fine. Other sites that are running on ...
3
votes
2answers
974 views

Init script & the green [ OK ]

I am trying to install fast-cgi for nginx on an EC2 instance. I followed the steps explained here, but that is meant for Debian and does not work out of the box for a red-hat based system. I modified ...
3
votes
4answers
2k views

How to add a pool to FPM (nginx) without reload/restart fpm itself?

Im building an environment (on a ubuntu 10.04.02 machine) to handle a website with many (should support at least 1000) subdomains, each of them served by a different FPM pool, with a different user. ...
3
votes
1answer
5k views

How to configure nginx+php (fcgi) to run every subdomain with a different user?

Im pretty new to nginx and - more for learning purpose - im trying to configure Nginx in order to run php with a different user for every subdomains. For example, i would like to use user john for ...
3
votes
2answers
2k views

configuring FastCGI on CentOS with PHP

So I was following this tutorial, but then I was stuck because when running the code: # yum install spawn-fcgi it says there is no package. I am using Nginx. Please suggest
3
votes
4answers
4k views

Why does mod_fastcgi in Apache complain that it does not have permission to create server?

This is a very old FastCGI issue but I have never found a satisfactory answer. Searching the phrase "(13) permission denied fastcgi can't create server" on Google will show that there's a lot of ...
3
votes
2answers
3k views

Nginx $document_root$fastcgi_script_name vs $request_filename

I can't notice any difference if in my config file I set fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Or: fastcgi_param SCRIPT_FILENAME $request_filename; What do ...
3
votes
3answers
97 views

Are there benefits in using CGI in a large scale Apache2 server or should I just use FASTCGI?

I have a web product done in PHP that theoretically should support a lot of users. Problem is, I just left the apache as it is and found out its just running as CGI. Is this very wrong and I should do ...
3
votes
4answers
6k views

Lighttpd cannot create php-fastcgi.socket

I have installed FastCGI using yum, and edited my lighttpd.conf, but when restarting the server I receive this error. 2009-06-24 12:44:43: (log.c.97) server started 2009-06-24 12:44:43: ...
3
votes
3answers
745 views

What's the optimal way to set up a Django server to serve multiple sites?

I currently use Apache 2.0 and FastCGI to serve my Django sites (I host multiple sites from a single server / IP). Each site has it's own FastCGI process which stops Apache forking multiple copies ...
3
votes
2answers
474 views

Nginx choose upstream depending on args

I need to two different sets of upstreams. But all my requests come from the same URL (same path). The difference is that some request will have a special argument and some won't. Depending on that, I ...
3
votes
1answer
403 views

Nginx - Enable PHP for all hosts

I am currently testing out nginx and have set up some virtual hosts by putting configurations for each virtual host in its own file in a folder called sites-enabled. I then ask nginx to load all ...