Apacheを起動できません

Apacheを起動できません

私はCentOS 7を使用しており、Webサイトをphp4からphp5に移行しています。仮想ホスト間のApache設定ファイルには次のものがあります。

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
AddDefaultCharset UTF--8

php_value session.gc_probability 1
php_value session.use_trans_sid 1
php_value PWD

次のエラーが発生します。

Jun 08 09:57:55 PHABCVAPACHE systemd[1]: Starting The Apache HTTP Server...
Jun 08 09:57:55 PHABCVAPACHE httpd[1401]: AH00526: Syntax error on line 24 of /etc/httpd/sites-enabled/example.com.conf:
Jun 08 09:57:55 PHABCVAPACHE httpd[1401]: php_value takes two arguments, PHP Value Modifier
Jun 08 09:57:55 PHABCVAPACHE systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 08 09:57:55 PHABCVAPACHE kill[1402]: kill: cannot find process ""
Jun 08 09:57:55 PHABCVAPACHE systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 08 09:57:55 PHABCVAPACHE systemd[1]: Failed to start The Apache HTTP Server.
Jun 08 09:57:55 PHABCVAPACHE systemd[1]: Unit httpd.service entered failed state.
Jun 08 09:57:55 PHABCVAPACHE systemd[1]: httpd.service failed.

問題はphp_value PWDにあります。残念ながら、Apacheが正しく動作するように変更する方法がわかりません。コメントすると、Apacheは実行中ですが、ログインフォームは機能しません。

誰でも私を助けることができますか?

ベストアンサー1

これらの2行はすべてを教えてくれます:

Jun 08 09:57:55 PHABCVAPACHE httpd[1401]: AH00526: Syntax error on line 24 of /etc/httpd/sites-enabled/example.com.conf:
Jun 08 09:57:55 PHABCVAPACHE httpd[1401]: php_value takes two arguments, PHP Value Modifier

example.com.confの24行目で、Apacheはphp_valueに2つのパラメータを期待しています。これで、提供した構成がexample.com.confの場合は、その構成ファイルでそれを変更する必要があります。

おすすめ記事