diff options
authorRemi Collet <>2019-05-16 14:52:30 +0200
committerRemi Collet <>2019-05-16 14:52:30 +0200
commite5abd3632f059c4e151fe488426e70936b1a3f96 (patch)
parent042c60b6bf4f1cca95cc7e6f95738f0f5e510b06 (diff)
add httpd and nginx configuration files for FPM in documentation
1 files changed, 19 insertions, 3 deletions
diff --git a/php56.spec b/php56.spec
index 6032383..fdc563d 100644
--- a/php56.spec
+++ b/php56.spec
@@ -166,8 +166,8 @@ Source7: php-fpm.logrotate
Source8: php-fpm.sysconfig
Source9: php.modconf
Source10: php.ztsmodconf
-Source12: php.conf2
+Source11: php.conf2
Source13: nginx-fpm.conf
Source14: nginx-php.conf
# Configuration files for some extensions
@@ -1559,7 +1559,18 @@ cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-php.conf
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
%if %{with_httpd2410}
-cat %{SOURCE12} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
+cat %{SOURCE11} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
+mkdir _fpmdoc
+cat %{SOURCE1} %{SOURCE11} >_fpmdoc/httpd-php.conf
+cat << 'EOF' >_fpmdoc/README
+To use FPM with Apache HTTP server:
+- copy the httpd-php.conf to %{_httpd_confdir}
+Tu use FPM with NGINX web server:
+- copy the nginx-fpm.conf to %{_sysconfdir}/nginx/conf.d
+- copy the nginx-php.conf to %{_sysconfdir}/nginx/default.d
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
@@ -1636,6 +1647,9 @@ sed -e 's@' \
# Apache
sed -e 's@proxy:fcgi://|fcgi://localhost@' \
-i $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
+install -D -m 644 %{SOURCE13} _fpmdoc/nginx-fpm.conf
+install -D -m 644 %{SOURCE14} _fpmdoc/nginx-php.conf
# Generate files lists and stub .ini files for each subpackage
@@ -1933,6 +1947,8 @@ EOF
%attr(0770,root,apache) %dir %{_localstatedir}/lib/php/wsdlcache
%if %{with_httpd2410}
%config(noreplace) %{_httpd_confdir}/php.conf
+%doc _fpmdoc/*
%config(noreplace) %{_sysconfdir}/php-fpm.conf
%config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf