Apache の設定は初めてで、Apache サーバーを最適化しようとしています。ドキュメントを読んで、 Prefork MPMの代わりにEvent MPMを使用する必要があることがわかりました。Prefork をコメントアウトし、00-mpm.conf のEvent のコメントを外すだけでよかったので、この時点まではすべて簡単でした。ただし、Apacheを再起動すると、次のエラーが発生しました-
AH00526: Syntax error on line 31 of /etc/httpd/conf.d/php.conf: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
さらに情報を掘り下げると、mod_php は Event で使用すべきではないことがわかりました。したがって、私はphp.confのphp_valueをコメントアウトし、10-php.conf のLoadModuleもコメントアウトしました。
Web ページが読み込まれなくなり、php-fpmを使用する必要があることに気付きました。ただし、これに関するドキュメントは非常に不明確であり、使用方法がわかりません。私はこれを試しました -
[root@ip-xxx-xx-xx-xxx ~]# yum install php-fpm
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package php70w-fpm.x86_64 0:7.0.4-1.w7 will be installed
--> Processing Dependency: php70w-common(x86-64) = 7.0.4-1.w7 for package: php70w-fpm-7.0.4-1.w7.x86_64
--> Running transaction check
---> Package php70w-common.x86_64 0:7.0.4-1.w7 will be installed
--> Processing Conflict: php70w-common-7.0.4-1.w7.x86_64 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
どうすればよいかわかりません。この問題について何か助けていただければ幸いです。ありがとうございました!