#問題
FreeBSDでapacheとPHPをインストールした後、PHPの設定ファイルを作成し、その後apache側で拡張子phpのファイルを認識できるようにするために、apacheのconfファイルを作りました。
その後
/usr/local/etc/rc.d/apache24/ restart
というコマンドを実行したのですがシンタックスエラーが出てしまいました。このエラーは見逃して次の行程に進んでも良いのでしょうか?わかる方回答お願いします。
#エラー文
Performing sanity check on apache24 configuration:
AH00526: Syntax error on line 1 of /usr/local/etc/apache24/Includes/php56/.conf:
AddType requires at least two arguments, a mime type followed by one or more file extensions
#追記
FreeBSDはver11.1
apacheは2.4
PHPは5.6をインストールしました。
#やってみたこと
/usr/local/etc/apache24/Includes/php56
上記のコマンドでapacheのconfファイルを新規作成。そのファイルに
AddType application /x-httpd-php.php
AddType application /x-httpd-php-source.phps
AddType text/html.php
DirectoryIndex index.html index.htm index.php
<FilesMatch ".php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".php$">
SetHandler application/x-httpd-php-source
</FilesMatch>
上の文を追記して保存。その後に
/usr/local/etc/rc.d/apache24 restart
このコマンドを実行してエラー文のようなものが表示される。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/03/04 14:11