From b3ff7694a7373b5b8e0ed67c8844b3ed53922a67 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 16 May 2019 14:52:58 +0200 Subject: add httpd and nginx configuration files for FPM in documentation --- php71.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/php71.spec b/php71.spec index 0eb0e37..f617e3d 100644 --- a/php71.spec +++ b/php71.spec @@ -869,7 +869,7 @@ Obsoletes: php53-mssql, php53u-mssql, php54-mssql, php54w-mssql, php55u-mssql, p %description pdo-dblib The php-pdo-dblib package contains a dynamic shared object that implements the PHP Data Objects (PDO) interface to enable access from -PHP to Microsoft SQL Server and Sybase databases through the FreeTDS libary. +PHP to Microsoft SQL Server and Sybase databases through the FreeTDS library. %package embedded Summary: PHP library for embedding in applications @@ -1612,6 +1612,17 @@ install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf %endif %if %{with_httpd2410} cat %{SOURCE11} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf +%else +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 +EOF %endif install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d @@ -1691,6 +1702,9 @@ sed -e 's@127.0.0.1:9000@unix:/run/php-fpm/www.sock@' \ # Apache sed -e 's@proxy:fcgi://127.0.0.1:9000@proxy:unix:/run/php-fpm/www.sock|fcgi://localhost@' \ -i $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf +%else +install -D -m 644 %{SOURCE13} _fpmdoc/nginx-fpm.conf +install -D -m 644 %{SOURCE14} _fpmdoc/nginx-php.conf %endif # Generate files lists and stub .ini files for each subpackage @@ -1968,6 +1982,8 @@ fi %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/opcache %if %{with_httpd2410} %config(noreplace) %{_httpd_confdir}/php.conf +%else +%doc _fpmdoc/* %endif %config(noreplace) %{_sysconfdir}/php-fpm.conf %config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf -- cgit