Mnemosyne is a abstract distribution originally designed for ROCKLinux, but currently only support the trunk of OpenSDE.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: target/mnemosyne/pkg_conf/php.conf
  5. # Copyright (C) 2006 - 2007 The OpenSDE Project
  6. # Copyright (C) 2002 - 2006 Alejandro Mery
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. case "$SDECFG_TRG_MNEMOSYNE_WEB" in
  16. apache)
  17. pkgprefix -t apache
  18. hook_add postmake 5 "mnemosyne_php_addconf $( pkgprefix sysconfdir apache )"
  19. mnemosyne_php_addconf() {
  20. mkdir -p $1/conf.d
  21. cat <<-EOT > $1/conf.d/php.conf
  22. LoadModule php5_module modules/libphp5.so
  23. AddHandler application/x-httpd-php .php
  24. EOT
  25. }
  26. ;;
  27. lighttpd)
  28. pkgprefix -t lighttpd
  29. hook_add postmake 7 "mnemosyne_php_addconf $( pkgprefix sysconfdir lighttpd )"
  30. mnemosyne_php_addconf() {
  31. cat <<-EOT >> $root$1/conf.d/php.conf-dist
  32. fastcgi.server = ( ".php" =>
  33. (( "socket" => "/tmp/php-fastcgi.socket",
  34. "bin-path" => "$bindir/php-cgi",
  35. "max-procs" => 1,
  36. "bin-environment" => (
  37. "PHP_FCGI_CHILDREN" => "16",
  38. "PHP_FCGI_MAX_REQUESTS" => "10000" ),
  39. "bin-copy-environment" => (
  40. "PATH", "SHELL", "USER" )
  41. ))
  42. )
  43. EOT
  44. }
  45. ;;
  46. esac