S
S
Sharov Dmitry2015-01-27 11:30:13
PHP
Sharov Dmitry, 2015-01-27 11:30:13

How to install multiple versions of php together with nginx?

We have:
Server running Ubuntu 12
nginx web server
and installed php 5.4
On this server, you need to run a site that refuses to work under php5.4, you need to run this site in parallel with php 5.2, while several others will work under 5.4
Can someone share a link to then how to do it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
OnYourLips, 2015-01-27
@OnYourLips

With nginx, it doesn't matter if you have one PHP or a dozen.
Still the same: fastcgi_pass 127.0.0.1:9054;
Just broadcast on different ports.
But I would refrain from installing unsupported versions of PHP (5.3 and below), they have bugs and holes.

P
Puma Thailand, 2015-01-27
@opium

It is logical not to fence the garden from php, but to use virtualization or docker containers.

A
Archie Kuznetsov, 2015-01-27
@Wolf4ara

1. nginx doesn't care who to work with, it just proxies fastcgi and that's it
2. I would put it on a separate virtual machine, although there are solutions that allow you to work with two PHP versions on one machine (I know from experience that a virtual machine is better)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question