Apache2 : Use PHP Scripts2021/05/17 |
Configure Apache2 to use PHP scripts.
|
|
[1] | Install PHP. |
root@www:~# apt -y install php php-cgi libapache2-mod-php php-common php-pear php-mbstring
|
[2] | Configure Apache2. |
root@www:~# a2enconf php7.4-cgi Enabling conf php7.4-cgi. To activate the new configuration, you need to run: systemctl reload apache2
root@www:~#
vi /etc/php/7.4/apache2/php.ini # line 962 : uncomment and add your timezone date.timezone = "Asia/Tokyo"
root@www:~#
systemctl restart apache2
# create a test page root@www:~# echo '<?php phpinfo(); ?>' > /var/www/html/info.php |
[3] | Verify to access to PHPInfo test page from any client computer. |
Sponsored Link |
|