C
C
chief2018-09-23 21:50:57
linux
chief, 2018-09-23 21:50:57

How to make nginx+mysql+all versions of PHP on Ubuntu 18.04.1?

I apologize in advance for the noob question.
I tried to google, I tried to do according to the instructions, but something went wrong ...
Do: Make a web server with nginx + different versions of PHP on one physical PC.
I'm new to Linux. I used Ubuntu a little and tried Slacks. Several sites are currently running Windows on Winginx. And in principle, figs with him, but there is PHP x32bit. And the recording of the log of IP addresses does not work normally on my site (it does not fit into 32 bits above 127.255.255.255).
Therefore, I’m ready to delve into Linux, I just need advice on how best (or easier) to do it. In all instructions there are options with Docker, phpbrew, or manually compile everything. But I don’t know the first two at all, and compiling from source codes fails for me. The maximum that I can do now is to install the current version of LEMP according to the manual :)
Please, tell me which of the methods will be easier to do for a beginner.
I'm not going to do hosting from a server. You don't need to run anything supernatural either. We need stable work for 3-4 sites with different versions of PHP.
Thanks in advance :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Yumashev, 2018-09-24
@skazkin

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2

Well, any other version.
They are installed regardless of where they are placed - look with the command
Further, accordingly, the required PHP is configured in Apache / Nginx in the appropriate ways. I recommend php-fpm - it will be easier to distinguish them by ports.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question