Canviar versió de PHP a Vagrant

Per canviar la versió de php al servidor NGINX de Vagrant, caldrà aixecar la màquina, entrar-hi amb SSH i executar:

sudo update-alternatives --config php
Això mostra una llista d'opcions a triar:

There are 7 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/php8.0   80        auto mode
  1            /usr/bin/php5.6   56        manual mode
  2            /usr/bin/php7.0   70        manual mode
  3            /usr/bin/php7.1   71        manual mode
  4            /usr/bin/php7.2   72        manual mode
  5            /usr/bin/php7.3   73        manual mode
  6            /usr/bin/php7.4   74        manual mode
* 7            /usr/bin/php8.0   80        manual mode

Press [enter] to keep the current choice[*], or type selection number: 6
update-alternatives: using /usr/bin/php7.4
to provide /usr/bin/php (php) in manual mode

Comentaris