入院中Linux Mintのお勉強ー apacheでphpを有効にする。

f:id:pideko:20190417171503p:plain


phpインストール

$sudo apt-get -y install php php-cgi libapache2-mod-php php-common php-pear php-mbstring

 

 

Apache2の設定

$sudo a2enconf php7.3-cgi

 

$sudo nano /etc/php/7.3/apache2/php.ini timezone = “Asia/Tokyo”

 

sudo systemctrl restart apache2

テキストエディタで簡易のindex.php作成

<html>

<body>

<div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;">

<?php

     print Date("Y/m/d");

?>

</div>

</body>

</html>