LoginSignup
1
0

More than 5 years have passed since last update.

RedHat7でphp-fpmの設定

Last updated at Posted at 2017-02-17

PHP7のインストールは、こちら

php-fpmの設定

今回のwebserverは、apacheでなくnginxなので、php-fpmの設定ファイルのユーザーとグループを変更します。設定と言ってもユーザ名とグループ名を変えるだけです。

# vi /etc/php-fpm.d/www.conf
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
; RPM: apache user chosen to provide access to the same directories as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx

設定ファイルの、userとgroupをnginxに変更。

デーモンの起動設定

# systemctl list-unit-files php-fpm.service
UNIT FILE       STATE
php-fpm.service disabled
1 unit files listed.

# systemctl enable php-fpm.service
Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.

# systemctl list-unit-files php-fpm.service
UNIT FILE       STATE
php-fpm.service enabled
1 unit files listed.

手動で起動。

systemctl start php-fpm.service
1
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
1
0