summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-05-16 14:52:58 +0200
committerRemi Collet <remi@remirepo.net>2019-05-16 14:52:58 +0200
commitb3ff7694a7373b5b8e0ed67c8844b3ed53922a67 (patch)
treefc1cb16828a225460fd2fd7441a5258c159f0fbb
parent955d20c5dd477ce5cdff1c5e7122e82fa2478ed6 (diff)
add httpd and nginx configuration files for FPM in documentation
-rw-r--r--php71.spec18
1 files changed, 17 insertions, 1 deletions
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