[packages/apache-php-fcgi: 6/7] move apache config as separate file

glen glen at pld-linux.org
Tue May 26 18:08:57 CEST 2015


commit 52ab9b62079ef89f45fb05bb0f4419e005e688e2
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue May 26 19:05:30 2015 +0300

    move apache config as separate file

 apache-php-fcgi.spec | 24 ++----------------------
 apache.conf          | 17 +++++++++++++++++
 2 files changed, 19 insertions(+), 22 deletions(-)
---
diff --git a/apache-php-fcgi.spec b/apache-php-fcgi.spec
index 51077e1..03abd20 100644
--- a/apache-php-fcgi.spec
+++ b/apache-php-fcgi.spec
@@ -5,6 +5,7 @@ Version:	5.6
 Release:	1
 License:	GPL
 Group:		Applications/WWW
+Source0:	apache.conf
 BuildRequires:	apache-devel >= 1.3.39
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires:	apache-mod_fastcgi
@@ -15,7 +16,6 @@ BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sysconfdir	%(%{apxs} -q SYSCONFDIR 2>/dev/null)
-%define		fcgiapp		/usr/bin/php56.fcgi
 
 %description
 This virtual package provides support for the PHP via FastCGI
@@ -24,30 +24,10 @@ protocol.
 %prep
 %setup -qcT
 
-cat <<'EOF' > apache.conf
-# setup via fastcgi to run php5
-<IfModule mod_fastcgi.c>
-	# the server name is bogus actually, to satisfy mod_fastcgi
-	FastCgiExternalServer %{fcgiapp} -socket /var/run/php/fcgi.sock -idle-timeout 120
-	ScriptAlias /php-fcgi %{fcgiapp}
-	<Location "/php-fcgi">
-		SetHandler fastcgi-script
-		Allow from all
-	</Location>
-
-	Action application/x-httpd-php-fcgi /php-fcgi
-</IfModule>
-
-# To register handler for .php in your config context:
-#<IfModule mod_fastcgi.c>
-#	AddType application/x-httpd-php-fcgi .php
-#</IfModule>
-EOF
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
-cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_php-fcgi.conf
+cp -p %{SOURCE0} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_php-fcgi.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 0000000..e25d256
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,17 @@
+# setup via fastcgi to run php5
+<IfModule mod_fastcgi.c>
+	# the server name is bogus actually, to satisfy mod_fastcgi
+	FastCgiExternalServer /usr/bin/php56.fcgi -socket /var/run/php/fcgi.sock -idle-timeout 120
+	ScriptAlias /php-fcgi /usr/bin/php56.fcgi
+	<Location "/php-fcgi">
+		SetHandler fastcgi-script
+		Allow from all
+	</Location>
+
+	Action application/x-httpd-php-fcgi /php-fcgi
+</IfModule>
+
+# To register handler for .php in your config context:
+#<IfModule mod_fastcgi.c>
+#	AddType application/x-httpd-php-fcgi .php
+#</IfModule>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache-php-fcgi.git/commitdiff/df585f07f45db72d1c6613a5fd2e58fff3dfb815



More information about the pld-cvs-commit mailing list