Welcome! Log In Create A New Profile

Advanced

How to configure Nginx to serve a variety of back-ends via multiple FCGI processes?

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 any number of FCGI's off one server is really what I need. My default configuration for django and php are attached. How could one run both off 1 nginx instance?

A new developer.
Attachments:
open | download - php (1.3 KB)
open | download - django (1.6 KB)
Solved:

Just change:

[code]
location /
{
FCGI..PARAMETERS for w/e
}
[/code]


To:

[code]
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)
}
[/code]


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.

A new developer.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 115
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready