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
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
%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
--- /dev/null
+# 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>