Questions tagged [fastcgi]
FastCGI is an open interface web servers can use to execute applications in a secure and isolated manner.
44
questions
70
votes
3
answers
75k
views
Is the PHP option 'cgi.fix_pathinfo' really dangerous with Nginx + PHP-FPM?
There has been a lot of talking about a security issue relative to the cgi.fix_pathinfo PHP option used with Nginx (usually PHP-FPM, fast CGI).
As a result, the default nginx configuration file used ...
4
votes
1
answer
5k
views
Two separate PHP-FPM sites seem to be using the same code?
I have two websites with two codebases, yet when I change one codebase, I see the change in both.
I have two checkouts of the same website. They are set up to use PHP-FPM through Apache2 with FastCGI....
36
votes
9
answers
158k
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 ...
30
votes
3
answers
9k
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 ...
25
votes
4
answers
68k
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 ...
24
votes
3
answers
72k
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 ...
16
votes
2
answers
22k
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 a domain a default is used (let's say php 5.3.17). ...
11
votes
3
answers
53k
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;
...
10
votes
3
answers
59k
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 ...
8
votes
3
answers
37k
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
1
answer
4k
views
fastcgi_cache_valid vs. fastcgi_cache_path "inactive" parameter?
If I've config
fastcgi_cache_path /opt/nginx levels=1:2 keys_zone=TEST:100m inactive=40m;
..
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_cache_valid 30m;
How long will my cache ...
5
votes
4
answers
19k
views
Alias using Nginx causing phpMyAdmin login endless loop
Recently I've been trying to set up a web server using Nginx (I normally use Apache). However I've ran into a problem trying to set phpMyAdmin up on an alias. The alias correctly takes you too the ...
4
votes
2
answers
19k
views
PHP + Apache long wait time
I've run into a bit of a brick wall with troubleshooting my dedicated websever.
Recently, my website spiked with the amount of request/per second and it crashed.
The box original had 8GB of RAM, 8 ...
1
vote
2
answers
4k
views
"<handler> scriptProcessor could not be found in <fastCGI> application configuration" when accessing PHP script in subfolder
I have a configuration problem with php on IIS 7.5.
It is a practically fresh install made with the MS Web PI on Win7.
I created a simple php testpage. It works in the root level http://localhost/...
-2
votes
1
answer
22k
views
CentOS 7 apache2 httpd + mod_fastcgi installation impossible
Has anyone tried to install mod_fastcgi on CentOS7/httpd yet?
Since it's not in the epel or fusion repos, I tried the el6 rpm, which wasn't working (httpd said: Cannot load modules/mod_fastcgi.so ...
19
votes
4
answers
41k
views
How do you conditionally include files in Nginx vhost?
In the lines below, I might have a site-specific configuration file that contains additional fastcgi_params unique to that site. If this file exists I want to load it.
server {
listen 80 ...
18
votes
3
answers
14k
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 ...
14
votes
5
answers
15k
views
Nginx/PHP-FPM long log lines get truncated
I am unsure is that is a Nginx or PHP-FPM setting, but long log lines are getting truncated. Is there a setting to increase the max log line length?
13
votes
3
answers
62k
views
nginx projects in subfolders
I'm getting frustrated with my nginx configuration and so I'm asking for help in writing my config file to serve multiple projects from sub-directories in the same root. This isn't virtual hosting as ...
8
votes
6
answers
4k
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. ...
7
votes
1
answer
3k
views
How to debug CGI over fcgiwrap/nginx
I serve executable scripts (mainly in C) through fcgiwrap connected with nginx. Since the scripts are complied, I can get the coding errors during compilation, but sometimes I receive CGI errors ...
7
votes
2
answers
9k
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 ...
7
votes
2
answers
4k
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, ...
6
votes
1
answer
10k
views
nginx + fcgiwrap: how come order of fastcgi_param matters?
I'm running Debian 6.0.3 (squeeze), nginx-0.7.67, fcgiwrap-1.0-1+squeeze1. Here is the test script:
#!/usr/bin/perl
use 5.010;
use warnings;
use strict;
use Data::Dumper;
print "Content-Type: text/...
6
votes
2
answers
6k
views
What is the difference between proxy_cache_ and fastcgi_cache?
I was searching for a simple Nginx microcache solution and I end up seeing two ways to have microcache. Some tutorials use proxy_cache, while others fastcgi_cache. What are the differences, pros and ...
5
votes
3
answers
16k
views
FastCGI and Apache 500 error intermittently
I have a FastCGI (mod_fastcgi)problem. It happens every once in a while, and does not casue a complete server meltdown, just 500 errors. Here are a couple things. First I am using APC so PHP is in ...
5
votes
2
answers
10k
views
Disable FastCGI Read Timeout in Nginx?
Is there a way to disable the read timeout for FastCGI? (fastcgi_read_timeout)
Setting it to zero does not work and just causes an immediate timeout.
Nginx 1.0.5
PHP-FPM 5.3.6-13ubuntu3.6
The ...
5
votes
2
answers
24k
views
Is there an access log for fastcgi?
I'm trying to set up a global location in nginx. It all works perfectly right now, other than PHP scripts requiring fastcgi. They're running a 404.
Is there a way I can see the exact path it's ...
4
votes
0
answers
2k
views
Apache 2.4 + PHP-FPM + Chromelogger (how to increase HTTP header length limit?)
I have a running Apache 2.4 + PHP-FPM setup.
There is one edge case though, when this setup fails - when using Chromelogger.
Chromelogger is a server to client debugging tool, which sends it's data ...
4
votes
2
answers
14k
views
nginx leads to 504 error, but my app is still running
So, we're using Node.js to power CompassionPit.com, and it's all served up by nginx.
nginx is throwing a 504 Gateway Time-out
The interesting thing, however, is that if I navigate to http://...
3
votes
1
answer
14k
views
PHP Errors (via FastCGI) with Nginx on Ubuntu Linode
I setup LEMP (Linux, Nginx, MySQL, and PHP) on a Ubuntu 10.04 server from Linode with the following guide: http://library.linode.com/lemp-guides/ubuntu-10.04-lucid
Essentially, I uploaded my PHP ...
3
votes
2
answers
8k
views
Nginx fastcgi_cache hide Set-Cookie when serving from cache
I'm trying to use nginx fastcgi_cache to serve some pages from my site, it worked fine but I found that sessions were being duplicated to all the users because Set-Cookie was cached in the response.
...
3
votes
4
answers
7k
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.
...
2
votes
1
answer
308
views
What does a jagged committed memory graph mean?
We've been attempting to debug load programs on our servers, and along the way we've been looking at some graphs, like this one:
(The white spaces are when the server got so hosed we couldn't collect ...
2
votes
2
answers
6k
views
Django, nginx, FastCGI - running via unix sockets, permission problems
I've configured nginx to run django site via socket:
fastcgi_pass unix:/tmp/django.socket;
now I'm (manually) running
./manage.py runfcgi socket=/tmp/django.socket
http request results in 502 bad ...
1
vote
2
answers
3k
views
Nginx redirect failure for icingaweb2
I'm trying to configure IcingaWeb2 using Nginx, and having some issues with it. The suggested Icinga Nginx configuration is:
location ~ ^/icingaweb2/index\.php(.*)$ {
# fastcgi_pass 127.0.0.1:9000;
...
1
vote
3
answers
2k
views
Nginx FastCGI not caching static files?
I configure fastCGI to cache with NginX. It work with .php file, but i can't cache static file like .jpg, .mp4...
My infomation when check with cURL:
curl -I http://192.168.1.223/music.php
HTTP/1.1 ...
1
vote
2
answers
16k
views
How to configure fastcgi to work with ligttpd in ubuntu
I am able to run lighttpd on ubuntu 9.10.
But when i tried to setup fastcgi with lighttpd by putting this in the ligttpd.conf file:
#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
...
1
vote
2
answers
5k
views
Nginx wont send POST to FastCGI backend, but GET works fine?
Not sure why, but it is happy sending a GET to the FastCGI backend (Mercurial hgwebdir in this case), but simply resorts to the filesystem if the request is a POST.
Relevant parts of nginx.conf:
...
0
votes
0
answers
106
views
Site with subdomains in redirect loop - Nginx configuration Issues
this is the website (the website also have subdomains)
nginx configuration:
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to ...
0
votes
1
answer
11k
views
nginx rewrite url to lowercase url
I have nginx setup, however I'm needing to fix an issue where someone types "/Home" to:
rewrite it to the lowercase "/home" (do this to all files and directories, not just home) but locate the ...
0
votes
1
answer
733
views
Redirect with lighttpd and fastcgi on Django App
I have setup my lighttpd in a fashion which redirects all subdomains to my primary domain in following fashion * .domain.com -> domain.com. Unfortunately when i type in a subdomain such as www.domain....
0
votes
1
answer
6k
views
nginx on fedora fastcgi not working
I'm running nginx on Fedora Server 22 and fastcgi scripts are not working.
Under http://panel.minefight.org/ enter any login data, it doesn't load the password fail or success site. The same thing ...
0
votes
2
answers
3k
views
Apache 2.4 + PHP-FPM + mod_fastcgi (Problems setting up PHP-FPM)
I have been trying to get PHP-FPM to work with Apache 2.4, but mod_fastcgi does not work with 2.4. Is there any solution to this problem? I want to run it using an UNIX socket, but I cannot find any ...