Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've seen a lot of tutorials showing one how to set up PHP/Python/Perl/RoR on nginx via various FCGI processes.

None of the tutorials that I found show one how to serve multiple FCGI services off one server.

How would one configure the stable nginx (nginx-0.7.64) to serve multiple FCGI processes (one for each of the above languages)?

Example addresses for each FCGI process are as follows:

127.0.0.1:8080 - PHP
127.0.0.1:8081 - Python
127.0.0.1:8082 - Perl
127.0.0.1:8083 - Ruby on Rails

An example configuration file that shows one how to implement multiple FCGI's off one server is really what I need. Perhaps others will benefit as well.

share|improve this question

1 Answer 1

Just change:

location /
{
FCGI..PARAMETERS (find on the web)
}

To:

location /python/

{
python FCGI..PARAMETERS (find on the web)
}

location /php/
{
php FCGI..PARAMETERS (find on the web)
}

location /perl/
{
perl FCGI..PARAMETERS (find on the web) - although nginx supports it embedded.
}

location /ror/
{
ror FCGI..PARAMETERS (find on the web)
}

Make the above folders, python/php/perl/ror under /var/www/nginx-default/ -> each will be served by a different FCGI process as per your FCGI configuration -> just place the files that need to be executed in their an run the fcgi process + restart nginx.

share|improve this answer

Your Answer

 
discard

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