ちょっとした動作の検証のためにAWSのEC2(標準のAmazon Linux AMI)へApacheとPHP(mod_php)をインストールしてみたのでメモ。無設定ならたったこれだけの手順。
これなら自分でサーバとか維持せずに、必要な時に構築すればいいなー。
Apacheインストール&起動
$ sudo yum -y install httpd
$ sudo service httpd start
PHPインストール
$ sudo yum -y install php
mod_phpの設定
は特にいらず。/etc/httpd/conf.d/php.conf
にデフォルトで記載されてる。
Apacheを再起動。
$ sudo service httpd restart
以上。