0
0

More than 3 years have passed since last update.

【PHP Apache】ソースコードが表示される

Posted at

LAMP環境構築の際、Apacheによりブラウザにindex.phpを表示させようとすると、ソースコードが表示されたので解決した方法をメモ。

下記ファイルをエディタで編集。



sudo vi /etc/apache2/httpd.conf

下記コメントアウト(#)を外す。


#LoadModule php7_module libexec/apache2/libphp7.so
↓
LoadModule php7_module libexec/apache2/libphp7.so

無事PHPとしてブラウザ表示成功。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0