From owner-freebsd-apache@FreeBSD.ORG Fri Aug 27 02:49:42 2004 Return-Path: Delivered-To: freebsd-apache@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E40C16A4CE for ; Fri, 27 Aug 2004 02:49:42 +0000 (GMT) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [210.226.20.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6409143D31 for ; Fri, 27 Aug 2004 02:49:41 +0000 (GMT) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by black.imgsrc.co.jp (Postfix) with ESMTP id 40BE850BE2 for ; Fri, 27 Aug 2004 11:49:40 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [IPv6:2001:218:422:2::9999]) by black.imgsrc.co.jp (Postfix) with ESMTP id BEBB850BC0 for ; Fri, 27 Aug 2004 11:49:38 +0900 (JST) Date: Fri, 27 Aug 2004 11:49:38 +0900 Message-ID: <7m3c295m7x.wl@black.imgsrc.co.jp> From: Jun Kuriyama To: apache@freebsd.org User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd 0.1 Subject: Using etc/apache2/Includes/ for lang/php5 X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2004 02:49:42 -0000 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 . 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 @@ + +AddType application/x-httpd-php .php +AddType application/x-httpd-php-source .phps + -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project