Apache2 and PHP 7.2 Setup on Ubuntu 18.04

We’re going to install PHP 7.2, Apache2 and neccessary other packages like imagemagick (imagick), memcached, etc. I do not like PHPMyAdmin, so it’s not going to be installed.

apt-get update
apt-get -y install apache2 apache2-doc apache2-utils libapache2-mod-php php7.2 php7.2-common php7.2-gd php7.2-mysql php7.2-imap php7.2-cli php7.2-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt  imagemagick libruby libapache2-mod-python php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl memcached php-memcache php-imagick php-gettext php7.2-zip php7.2-mbstring php-soap php7.2-soap
a2enmod suexec rewrite ssl actions include cgi
a2enmod dav_fs dav auth_digest headers
nano /etc/apache2/conf-available/httpoxy.conf
<IfModule mod_headers.c>
    RequestHeader unset Proxy early
</IfModule>
a2enconf httpoxy
service apache2 restart

PHP-FPM

apt-get -y install php7.2-fpm
a2enmod actions proxy_fcgi alias 
service apache2 restart
· apache, php, ubuntu