PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

learn more… | top users | synonyms (2)

1
vote
1answer
999 views

Nginx: Bad Gateway 502 error

I am running Nginx with PHP5-FPM on Amazon EC2 on Ubuntu 12.04 64-bit. I get a bad gateway error whenever I got to my site. I know that it is a configuration issue but I am not sure what is badly ...
1
vote
1answer
4k views

How to pass custom parameters to PHP from Nginx?

I'm using Nginx 1.2.4 in combination with PHP-FPM 5.4.8 with a fastcgi pass and trying to pass custom parameters to PHP. Here are the options I have found so far: using the env directive to set an ...
1
vote
2answers
482 views

PHP-FPM for nginx on debian

What is the preferred/recommended way of installing php-fpm on debian for use with nginx? I read about a "php5-fpm" package everywhere, but it's not available in the official debian repos any more. ...
0
votes
1answer
359 views

Drupal & nginx : a sound “general purpose” configuration? [closed]

After a bit back and forth with configuring Drupal and nginx to work together, I've come up with the below configuration for a site. It works well, both with private and public file systems. However, ...
0
votes
1answer
789 views

piping nginx and php-fpm logs to MySQL

I got a number of nginx + php-fpm application servers running under LB. I would like to centralize the logs into external mysql database. I was wondering if there is a way of achieving this ? I ...
1
vote
1answer
1k views

PHP-FPM signals for pool error_log rotation

I am moving all my server's log rotation tasks for logrotate. The server has several PHP-FPM pools, each of them configured with a separated error_log directive. The logrotate recipe for the logs is ...
0
votes
3answers
602 views

PHP does not allow https connections

Hey guys im running PHP 5.4.0 and I cannot cURL nor files_get_content() https connections. Using curl in a PHP script shows: [root@ns1]# /opt/php/bin/php -q test.php * About to connect() to ...
0
votes
1answer
265 views

PHP crashing during oAuth scripts

I just installed Nginx 1.2.4 and PHP 5.4.0 (from svn) (php fpm). CentOs 5.8 64 The problem I have is that PHP crashes the moment I run any social oAuth scripts. I have tried to log into Facebook, ...
1
vote
2answers
536 views

NGinX config for Django and Wordpress in subdirectory

I need to set up a Django site at the root of a domain, but then have a Wordpress installation in a subdirectly (e.g. /blog/). How would one configure NGinX to do this? "Pretty" URLs have to work for ...
3
votes
2answers
3k views

Nginx ignoring client's HTTP 1.0 request and respond by HTTP 1.1

I am testing using nginx/php5-fpm, with the code <?php header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); // also tested: header("Status: 404 Not Found"); echo $_SERVER["SERVER_PROTOCOL"]; ...
0
votes
1answer
542 views

Apache 2.4 Prefork vs. PHP-FPM Event shows sig decrease in requests per second

On my Apache 2.4.2 server with a standard mod_php Prefork setup these are my server-status results Current Time: Wednesday, 24-Oct-2012 19:36:24 CDT Restart Time: Wednesday, 24-Oct-2012 01:27:30 CDT ...
0
votes
1answer
419 views

how exactly does nginx/php-fpm process requests?

I'm currently testing a new nginx/php-fpm I have setup on a new VPS with 4GB of RAM: from my php-fpm process pool config: pm = static pm.max_children = 10 I have a simple load.php script which has ...
1
vote
1answer
2k views

502 Bad gateway on big file uploads : Nginx + PHP-FPM

I'm running php-fpm on nginx I have my php.ini values set as follows upload_max_filesize = 100M post_max_size = 128M max_execution_time = 180 I have also set my client_max_body_size to 4G. When I ...
2
votes
0answers
225 views

Nginx / PHP-FPM setting 404 / 5xx on externals

So I've recently been trying to help out the community by building a pimcore based nginx vhost config. Everything works very well from what I can see except for 1 small issue. If any of the pages ...
1
vote
1answer
209 views

Set global handling for PHP scripts in NGINX + PHP-FPM

I have to define fastcgi_pass for every virtual host. How do I define it global-wise? server { listen 80; server_name www.domain.tld; location / { root ...
1
vote
0answers
94 views

Domain root on nginx not working

mydomain.com is running with nginx1.2, php-fpm, apc on an ubuntu server (medium - amazon ec2). I have been tweaking my server for past 6 months, however a problem started occurring since day before ...
1
vote
1answer
4k views

Apache and multiple PHP-FPM pools

I have two sites that I run from apache 2.2 vhosts with PHP-FPM 5.4 on Ubuntu 12.04. Until now I've been using a server-wide (stock) mod_fastcgi config, but now I want to split this into two FPM pools ...
1
vote
1answer
2k views

Turn off gzip for a location in Nginx

How can gzip be turned off for a particular location and all its sub-directories? My main site is at http://mydomain.com and I want to turn gzip off for both http://mydomain.com/foo and ...
3
votes
1answer
653 views

Installing checkinstall on x86_64 bit

I downloaded the source for check install. checkinstall-1.6.2.tar.gz. I then tar -xzvf checkinstall-1.6.2.tar.gz Then I make. It prints this error: [root@ip-50-63-180-135 checkinstall-1.6.2]# ...
2
votes
1answer
7k views

Unable to install PHP-FPM on Apache (Failed to connect to FastCGI server)

I have been having problem installing php-fpm for use with apache2-mpm-worker. This is the guide that I am following. According to the guide's Step 5, Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi ...
0
votes
1answer
338 views

What should be proper permission of unix socket?

I have set up nginx to connect to php5-fpm through unix socket instead of tcp. I've read that this has less overhead and hence boost performance. Now I'm wondering what should be the proper permission ...
0
votes
1answer
779 views

Install php-fpm + php-mysql + MariaDB on Centos from repos

I try to take CentOS 6.4 x64 and install nginx w/ php-fpm on it (and that's easy part, no problem at all), then add php-mysql package and MariaDB as a mysql drop-in replacement. And here I face the ...
3
votes
0answers
345 views

php-fpm crashing because of to many mysql processes

I have 2 frontend nginx servers going to 4 backend php-fpm servers which all run Wordpress. The php-fpm servers all connect to one MySQL server and I was checking some stats earlier each php-fpm ...
1
vote
1answer
1k views

GeoIP and Nginx

I have a nginx with geoip, but it is not working rightly. The issue is the next: Nginx are getting geodata from $_SERVER['REMOTE_ADDR'] instead of $_SERVER['HTTP_X_HAPROXY_IP'], which have the real ...
1
vote
0answers
551 views

nginx 502 bad gateway some files

im using cloudflare. my site working good but not loading any images, css files and js files. my server details; ubuntu 12.04 nginx/1.1.19 php5-fpm mysql you can check live here Check with www and ...
2
votes
1answer
308 views

Linux Nginx + php-fpm + cron + mysqld = always out of memory

I don't get it. I have a VPS with Nginx and php-fpm and MySQL. Should be very lightweight. No Apache, right? When I reboot, it is very lightweight. ~ 50/481 MB MEM usage. Very acceptable IMO. And ...
3
votes
1answer
17k views

How do I change the NGINX user?

I have a PHP script that creates a directory and outputs an image to the directory. This was working just fine under Apache but we recently decided to switch to NGINX to make more use of our limited ...
0
votes
1answer
517 views

File upload folder permission fastCGI - How to make it writeable?

I am using centos 5.7 with cPanel WHM running fastcgi/suEXEC I am trying to make a particular folder writable to allow a script to upload files but seem to be having problems. The folder (and all ...
1
vote
1answer
566 views

nginx + php-fpm cycle redirection error on linode new vps

I'm new to nginx, and I'm trying to make my first server run. I followed this guide as I'm trying to use it for a multisite wordpress site. After installing everything, I get a 500 Internal server ...
1
vote
2answers
629 views

Compiling PHP on Solaris

I'm compiling PHP with --enable-fpm on Solaris 10 (sun4v sparc SUNW,Sun-Fire-T1000) and it stops at #error Sparc v8 and predecessors are not and will not be supported (see bug report 53310) ...
2
votes
1answer
2k views

Apache FCGI PHP-FPM Mac OS X 10.8 unable to bind

So I have found a few other threads about this kind of issue, but their solutions aren't working for me. Basically, this is my development machine and the setup has been fine for a number of weeks ...
3
votes
2answers
1k views

PHP-FPM chroot with chdir

I am trying to setup a site inside of a PHP-FPM chroot. My paths are as follows: chroot = /var/www/ chdir = www/ The chroot works just fine without chdir. But when I add chdir I get this error on ...
1
vote
1answer
409 views

fastcgi cache how-to cache for logged-in users and make it custom for each user

Currently I'm doing cache using fastcgi_cache for non-logged-in users, and using ( if + fastcgi_no_cache + fastcgi_cache_bypass ) to pass logged-in users directly to backend which is PHP-FPM. this ...
0
votes
1answer
336 views

Ubuntu 12.04 php5-fpm stopped recognizing MySQL

So this morning I used aptitude to install a few security updates. Seemed innocent enough until stuff stopped working. Somewhere along the way, a few packages got dropped, I guess. Now PHP ...
2
votes
3answers
2k views

php-fpm version 5.4 with nginx constantly restarting

I just upgraded my php version from 5.3.x to 5.4.x and since doing this - memory has dropped signifincantly! - however, I'm constantly getting these in my php5-fpm.log: [18-Sep-2012 15:11:34] ...
1
vote
1answer
243 views

nginx clean url router/rewrites

im having difficulties with a relativity simple rewrite rules / router in nginx config. All I want to do is, if requested dir or file 'host/my/request/path[/[index.php]]' does not exist, rewrite to ...
2
votes
1answer
4k views

phpmyadmin having problems on nginx and php-fpm on RHEL 6

We have a web server setup with nginx and php-fpm on RHEL6. This machine already has Wordpress installed, and it runs great. We have wordpress set up to go to wptest.domain.local. We then created a ...
0
votes
1answer
2k views

NGINX : Keep alive requests to static content ok - Keep alive requests to php-fpm requests hang until keepalive_timeout is reached

FYI, the initial question I have posted is here, no need to read it as I was way off initially: NGINX + PHP-FPM - Strange issue when trying to display images via php-gd / readfile - Connection wont ...
1
vote
0answers
291 views

Need help optimizing a LEMP stack on a 4GB dedicated server

Recently i got a project i'm working in financed by a friend. So he gave me access to a 60mbps dedicated connection link and a HP Compaq 8200 Elite. The HP is just a desktop, but i'm using it as a ...
0
votes
1answer
178 views

How can I protect access to specific php files at the root of my website

I want to restrict access to (and only to) http://mysite.com/protected.php using nginx. What can I try? For the moment, I managed to do that but the php file is no longer interpreted by php-fpm. ...
3
votes
1answer
811 views

Using a mounted NTFS share with nginx

I have set up a local testing VM with Ubuntu Server 12.04 LTS and the LEMP stack. It's kind of an unconventional setup because instead of having all my PHP scripts on the local machine, I've mounted ...
1
vote
0answers
127 views

Nginx for a site allowing downloads

My friend have a site that allows users to download files.However the moment one guy start downloading server load change from 0.00 to 3.50 in a matter of minutes.Nginx and php-fpm reach D state and ...
0
votes
1answer
398 views

php-fpm error logging with nginx

I have nginx+php-fpm on a server and the messages get truncated at 2048 chars, rendering the message quite unhelpful when a stack trace is logged : I can't see the following fields anymore: host ...
3
votes
1answer
1k views

Why Is PHP-FPM Only Using One Process?

Looking at my PHP-FPM stats page, it looks like only one process is handling all of the connections right now. My guess is that requests are being executed so quickly, thus far, that it doesn't need ...
0
votes
1answer
764 views

How can I setup nginx to serve virtualhosts with rails(unicorn/passenger) and php-fpm

I would like to serve multiple sites on one instance. I install nginx, php-fpm, and a rails app. I use sites like this to guide me. I configure php-fpm to listen to a local socket listen = ...
2
votes
3answers
825 views

High memory usage on the server - can't determine the process

I've noticed high memory usage on the server. Details: OS: CentOS 6.3 - x86_64 Web server: Nginx with PHP-FPM The server is generating PDF documents so the traffic is minimum. top: # top -b -n 1 ...
0
votes
1answer
293 views

Trying to setup virtual hosts on unix PHP on nginx

I have tried to install php5-fpm and Nginx on Ubuntu machine, but I got a problem. When I have only one virtual host on a unix port it is all fine but when I try to add another virtual host Nginx goes ...
1
vote
1answer
1k views

nginx giving 404 when accessing php from alias directory

I am trying to migrate from apache to nginx. The php sites that I am hosting need to access a shared library which turns out to be an alias directory. Below is the configuration I came up with. html ...
2
votes
1answer
305 views

How to cut php-fpm IOPS

I have Amazon EC2 instance with NGINX + PHP-FPM (through socket) + APC. I see sth. like this in iotop on high load. Total DISK READ: 0.00 B/s | Total DISK WRITE: 0.00 B/s TID PRIO ...
1
vote
2answers
973 views

Suggest me a good php-fpm configuartion [closed]

I am configuring a server for a friend.The server has the following specs 8GB RAM Quad Core processor 1 TB HDD 100 mbps port However all php files are loadking very slowly.I did a speedtest and ...