title: Why installing php7.4 on ubuntu 20 I have php 8 in the console?
body: <p>Installing php7.4 on ubuntu 20(aws server) I have php 8 installed.
  I tried to disable it and enable 7.4.
  All my output commands below show valid output, but restarting apache I have php8 anyway:</p>
  <pre><code>ubuntu@ip-172-31-38-186 : ubuntu :~$ cd /etc/php
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ ls -la
  total 36
  drwxr-xr-x  9 root root 4096 Jul 22 11:28 .
  drwxr-xr-x 96 root root 4096 Jul 25 03:59 ..
  drwxr-xr-x  3 root root 4096 Jul 22 11:28 5.6
  drwxr-xr-x  3 root root 4096 Jul 22 11:28 7.0
  drwxr-xr-x  3 root root 4096 Jul 22 11:28 7.1
  drwxr-xr-x  3 root root 4096 Jul 22 11:28 7.2
  drwxr-xr-x  3 root root 4096 Jul 22 11:28 7.3
  drwxr-xr-x  5 root root 4096 Jul 22 11:23 7.4
  drwxr-xr-x  5 root root 4096 Jul 22 11:28 8.0
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ uname -a
  Linux ip-172-31-38-186 5.8.0-1041-aws #43~20.04.1-Ubuntu SMP Thu Jul 15 11:07:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ php -v
  PHP 8.0.8 (cli) (built: Jul  1 2021 15:26:46) ( NTS )
  Copyright (c) The PHP Group
  Zend Engine v4.0.8, Copyright (c) Zend Technologies
      with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ sudo a2dismod php8.0
  Module php8.0 already disabled
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ sudo a2dismod php8
  ERROR: Module php8 does not exist!
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ sudo a2dismod php8.0.8
  ERROR: Module php8.0.8 does not exist!
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ sudo a2enmod php7.4
  Considering dependency mpm_prefork for php7.4:
  Considering conflict mpm_event for mpm_prefork:
  Considering conflict mpm_worker for mpm_prefork:
  Module mpm_prefork already enabled
  Considering conflict php5 for php7.4:
  Module php7.4 already enabled
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ sudo service apache2 restart
  ubuntu@ip-172-31-38-186 : ubuntu :/etc/php$ php -v
  PHP 8.0.8 (cli) (built: Jul  1 2021 15:26:46) ( NTS )
  Copyright (c) The PHP Group
  Zend Engine v4.0.8, Copyright (c) Zend Technologies
      with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
  </code></pre>
  <p>restarting OS did not help.
  How to setup php 7.4 ?</p>
  <p>Thanks!</p>