Welcome! Log In Create A New Profile


Re: Question about install support for python and php together

Phillip Oldham
May 07, 2010 04:34AM
On 06/05/2010 04:17, sagasw wrote:
> I get a vps host and install php already with spawn-fcgi.
> And you could see my steps here:
> http://sunxiunan.com/?p=1618
> Now I want to add support python (web.py) in this host,
> http://webpy.org/cookbook/fastcgi-nginx
> and try the steps in web.py, but can't work correct.
> just get
> spawn-fcgi: child exited with: 2
> Who could tell me the steps I should do?

I've personally had nothing but problems with spawn-fcgi and stopped
using it years ago. The -b switch for the php-cgi config tells PHP to
bind to an address:port, so you don't really need spawn-fcgi as long as
something can keep an eye on the process.

We use supervisord to spawn & manage both PHP & Python services which
sit behind nginx. A supervisor config with something like the following
should get you going:

command=/usr/bin/php-cgi -c /etc/php.ini -b 8888

command=/usr/bin/python mywsgiapp.py

Then in your nginx config simply create a config file for each FCGI
environment (php/python) and add any "backends" (for python,
specifically) to your vhosts.

You can even use supervisord to start/manage your nginx instance. We
have supervisord manage everything, and have monit keeping an eye on
supervisord as an added bonus.

You can see more on supervisord at http://supervisord.org, however the
site is going through a server move at the moment so they've only got
the manual up at the moment.


*Phillip B Oldham*
phill@activityhq.com <mailto:phill@theactivitypeople.co.uk>



This e-mail and its attachments are intended for the above named
recipient(s) only and may be confidential. If they have come to you in
error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them to anyone.

This e-mail has been created in the knowledge that Internet e-mail is
not a 100% secure communications medium, and we have taken steps to
ensure that this e-mail and attachments are free from any virus. We must
advise that in keeping with good computing practice the recipient should
ensure they are completely virus free, and that you understand and
observe the lack of security when e-mailing us.


nginx mailing list
Subject Author Posted

Question about install support for python and php together

sagasw May 05, 2010 11:22PM

Re: Question about install support for python and php together

Joshua Jonah May 06, 2010 09:46AM

Re: Question about install support for python and php together

Phillip Oldham May 07, 2010 04:34AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready