php-fpm.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --- sapi/fpm/Makefile.frag.orig
  2. +++ sapi/fpm/Makefile.frag
  3. @@ -15,8 +15,8 @@
  4. else \
  5. echo "Installing PHP FPM defconfig: $(INSTALL_ROOT)$(sysconfdir)/" && \
  6. $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d; \
  7. - $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default; \
  8. - $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default; \
  9. + $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf; \
  10. + $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf; \
  11. fi
  12. @echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/"
  13. --- sapi/fpm/php-fpm.conf.in.orig
  14. +++ sapi/fpm/php-fpm.conf.in
  15. @@ -14,14 +14,14 @@
  16. ; Pid file
  17. ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
  18. ; Default Value: none
  19. -;pid = run/php-fpm.pid
  20. +;pid = /run/php-fpm/php-fpm.pid
  21. ; Error log file
  22. ; If it's set to "syslog", log is sent to syslogd instead of being written
  23. ; into a local file.
  24. ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
  25. ; Default Value: log/php-fpm.log
  26. -;error_log = log/php-fpm.log
  27. +error_log = syslog
  28. ; syslog_facility is used to specify what type of program is logging the
  29. ; message. This lets syslogd specify that messages from different facilities
  30. --- sapi/fpm/www.conf.in.orig
  31. +++ sapi/fpm/www.conf.in
  32. @@ -33,7 +33,7 @@
  33. ; (IPv6 and IPv4-mapped) on a specific port;
  34. ; '/path/to/unix/socket' - to listen on a unix socket.
  35. ; Note: This value is mandatory.
  36. -listen = 127.0.0.1:9000
  37. +listen = /run/php-fpm/php-fpm.sock
  38. ; Set listen(2) backlog.
  39. ; Default Value: 511 (-1 on FreeBSD and OpenBSD)
  40. @@ -45,8 +45,8 @@
  41. ; and group can be specified either by name or by their numeric IDs.
  42. ; Default Values: user and group are set as the running user
  43. ; mode is set to 0660
  44. -;listen.owner = @php_fpm_user@
  45. -;listen.group = @php_fpm_group@
  46. +listen.owner = @php_fpm_user@
  47. +listen.group = @php_fpm_group@
  48. ;listen.mode = 0660
  49. ; When POSIX Access Control Lists are supported you can set them using
  50. ; these options, value is a comma separated list of user/group names.
  51. @@ -371,7 +371,7 @@
  52. ; Chdir to this directory at the start.
  53. ; Note: relative path can be used.
  54. ; Default Value: current directory or / when chroot
  55. -;chdir = /var/www
  56. +;chdir = /var/www
  57. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
  58. ; stderr will be redirected to /dev/null according to FastCGI specs.
  59. --- sapi/fpm/php-fpm.service.in.orig
  60. +++ sapi/fpm/php-fpm.service.in
  61. @@ -8,7 +8,7 @@
  62. [Service]
  63. Type=@php_fpm_systemd@
  64. -PIDFile=@EXPANDED_LOCALSTATEDIR@/run/php-fpm.pid
  65. +PIDFile=/run/php-fpm/php-fpm.pid
  66. ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf
  67. ExecReload=/bin/kill -USR2 $MAINPID