Using etc/apache2/Includes/ for lang/php5
Jun Kuriyama
kuriyama at imgsrc.co.jp
Thu Aug 26 19:49:42 PDT 2004
Hi,
I'd like to hear comments about this patch (not yet tested, just an
idea).
When I installed lang/php5, I suggested to add directives in
httpd.conf by lang/php5/pkg-message.mod. But I think it would be good
if I can use PHP out of the box after installing lang/php5.
And, www/apache2 port has a feature to include config files
automatically which are matched with etc/apache2/Includes/*.conf glob.
So I'd like to install php5.conf file from lang/php5 port.
And I want to use conditional DirectoryIndex wrapped with <IfModule
mod_php5.c>. There are such conditionals in 1.3 port patch, but we
don't have in 2.0 port. How about adding them in 2.0 port, too?
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/php5/Makefile,v
retrieving revision 1.73
diff -u -r1.73 Makefile
--- Makefile 23 Aug 2004 13:18:38 -0000 1.73
+++ Makefile 27 Aug 2004 02:28:09 -0000
@@ -96,6 +96,11 @@
.if defined(WITH_APACHE)
PLIST_SUB+= APACHE=""
+.if defined(WITH_APACHE2)
+PLIST_SUB+= APACHE2=""
+.else
+PLIST_SUB+= APACHE2="@comment "
+.endif
.else
PLIST_SUB+= APACHE="@comment "
.endif
@@ -198,8 +203,12 @@
@${INSTALL_DATA} ${WRKDIR}/php.conf ${PREFIX}/etc
@${TOUCH} ${PREFIX}/include/php/ext/php_config.h
.if defined(WITH_APACHE)
+.if defined(WITH_APACHE2)
+ @${INSTALL_DATA} ${FILESDIR}/apache2-php5.conf ${PREFIX}/etc/apache2/Includes/php5.conf
+.else
@${CAT} ${PKGMESSAGE}
.endif
+.endif
.else
.if ${PKGNAMESUFFIX} == "-pear"
Index: pkg-message.mod
===================================================================
RCS file: /home/ncvs/ports/lang/php5/pkg-message.mod,v
retrieving revision 1.1
diff -u -r1.1 pkg-message.mod
--- pkg-message.mod 19 Jul 2004 07:05:33 -0000 1.1
+++ pkg-message.mod 27 Aug 2004 02:26:23 -0000
@@ -2,7 +2,8 @@
Make sure index.php is part of your DirectoryIndex.
-You should add the following to your Apache configuration file:
+You should add the following to your Apache configuration file
+(if you are using www/apache13):
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/lang/php5/pkg-plist,v
retrieving revision 1.15
diff -u -r1.15 pkg-plist
--- pkg-plist 28 Jul 2004 08:59:35 -0000 1.15
+++ pkg-plist 27 Aug 2004 02:26:57 -0000
@@ -5,6 +5,7 @@
etc/php.conf
etc/php.ini-dist
etc/php.ini-recommended
+%%APACHE2%%/etc/apache/Includes/php5.conf
include/php/TSRM/TSRM.h
include/php/TSRM/acconfig.h
include/php/TSRM/readdir.h
Index: files/apache2-php5.conf
===================================================================
RCS file: files/apache2-php5.conf
diff -N files/apache2-php5.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/apache2-php5.conf 27 Aug 2004 02:25:32 -0000
@@ -0,0 +1,4 @@
+<IfModule mod_php5.c>
+AddType application/x-httpd-php .php
+AddType application/x-httpd-php-source .phps
+</IfModule>
--
Jun Kuriyama <kuriyama at imgsrc.co.jp> // IMG SRC, Inc.
<kuriyama at FreeBSD.org> // FreeBSD Project
More information about the freebsd-apache
mailing list