I have the following code that installs php7.1 on Ubuntu 16.04:
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1
#Modules
sudo apt-get install -y php7.1-cli
sudo apt-get install -y php7.1-common
sudo apt-get install -y php7.1-json
sudo apt-get install -y php7.1-opcache
sudo apt-get install -y php7.1-mysql
sudo apt-get install -y php7.1-mbstring
sudo apt-get install -y php7.1-mcrypt
sudo apt-get install -y php7.1-zip
sudo apt-get install -y php7.1-fpm
sudo apt-get install -y php7.1-xml
sudo apt-get install -y php7.1-xmlrpc
#sudo apt-get install -y php-token-stream
As noted below, it also installs Apache, and offers no options.
My interest is to use NGINX instead of Apache.
So I wonder if there is any way to install php7.1 without going through the apache installation?