php8.1: for apache config

This commit is contained in:
Đoàn Trần Công Danh 2024-01-02 20:42:14 +07:00 committed by Đoàn Trần Công Danh
parent b9df710048
commit f12a362cee
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Required modules: dir_module, php8.1_module
# Required modules: dir_module, php_module
<IfModule dir_module>
<IfModule php8.1_module>
<IfModule php_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php

View File

@ -1,7 +1,7 @@
# Template file for 'php8.1'
pkgname=php8.1
version=8.1.26
revision=3
revision=4
_php_version=8.1
hostmakedepends="bison pkg-config apache-devel"
makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
@ -204,6 +204,9 @@ php8.1-apache_package() {
short_desc+=' - Apache SAPI'
depends="php${_php_version}>=${version}_${revision}"
conf_files="/etc/apache/extra/php${_php_version}_module.conf"
alternatives="
php-apache:libphp.so:/usr/libexec/httpd/modules/libphp${_php_version}.so
php-apache:php_module.conf:/etc/apache/extra/php${_php_version}_module.conf"
pkg_install() {
vinstall ${wrksrc}/build-apache/libs/libphp.so 755 usr/libexec/httpd/modules "libphp${_php_version}.so"
vinstall ${FILESDIR}/apache.conf 644 etc/apache/extra "php${_php_version}_module.conf"