fastcgi.conf 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #######################################################################
  2. ##
  3. ## FastCGI Module
  4. ## ---------------
  5. ##
  6. ## http://www.lighttpd.net/documentation/fastcgi.html
  7. ##
  8. server.modules += ( "mod_fastcgi" )
  9. ##
  10. ## PHP Example
  11. ## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
  12. ##
  13. ## The number of php processes you will get can be easily calculated:
  14. ##
  15. ## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
  16. ##
  17. ## for the php-num-procs example it means you will get 17*5 = 85 php
  18. ## processes. you always should need this high number for your very
  19. ## busy sites. And if you have a lot of RAM. :)
  20. ##
  21. #fastcgi.server = ( ".php" =>
  22. # ( "php-local" =>
  23. # (
  24. # "socket" => socket_dir + "/php-fastcgi-1.socket",
  25. # "bin-path" => server_root + "/cgi-bin/php5",
  26. # "max-procs" => 1,
  27. # "broken-scriptfilename" => "enable",
  28. # )
  29. # ),
  30. # ( "php-tcp" =>
  31. # (
  32. # "host" => "127.0.0.1",
  33. # "port" => 9999,
  34. # "check-local" => "disable",
  35. # "broken-scriptfilename" => "enable",
  36. # )
  37. # ),
  38. #
  39. # ( "php-num-procs" =>
  40. # (
  41. # "socket" => socket_dir + "/php-fastcgi-2.socket",
  42. # "bin-path" => server_root + "/cgi-bin/php5",
  43. # "bin-environment" => (
  44. # "PHP_FCGI_CHILDREN" => "16",
  45. # "PHP_FCGI_MAX_REQUESTS" => "10000",
  46. # ),
  47. # "max-procs" => 5,
  48. # "broken-scriptfilename" => "enable",
  49. # )
  50. # ),
  51. # )
  52. ##
  53. ## Ruby on Rails Example
  54. ##
  55. ## Normally you only run one Rails application on one vhost.
  56. ##
  57. #$HTTP["host"] == "rails1.example.com" {
  58. # server.document-root = server_root + "/rails/someapp/public"
  59. # server.error-handler-404 = "/dispatch.fcgi"
  60. # fastcgi.server = ( ".fcgi" =>
  61. # ("someapp" =>
  62. # ( "socket" => socket_dir + "/someapp-fcgi.socket",
  63. # "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
  64. # "bin-environment" => (
  65. # "RAILS_ENV" => "production",
  66. # "TMP" => home_dir + "/rails/someapp",
  67. # ),
  68. # )
  69. # )
  70. # )
  71. #}
  72. ##
  73. ## Another example with multiple rails applications on one vhost.
  74. ##
  75. ## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
  76. ##
  77. #$HTTP["host"] == "rails2.example.com" {
  78. # $HTTP["url"] =~ "^/someapp1" {
  79. # server.document-root = server_root + "/rails/someapp1/public"
  80. # server.error-handler-404 = "/dispatch.fcgi"
  81. # fastcgi.server = ( ".fcgi" =>
  82. # ("someapp1" =>
  83. # ( "socket" => socket_dir + "/someapp1-fcgi.socket",
  84. # "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
  85. # "bin-environment" => (
  86. # "RAILS_ENV" => "production",
  87. # "TMP" => home_dir + "/rails/someapp1",
  88. # ),
  89. # "strip-request-uri" => "/someapp1/"
  90. # )
  91. # )
  92. # )
  93. # }
  94. #
  95. # $HTTP["url"] =~ "^/someapp2" {
  96. # server.document-root = server_root + "/rails/someapp2/public"
  97. # server.error-handler-404 = "/dispatch.fcgi"
  98. # fastcgi.server = ( ".fcgi" =>
  99. # ("someapp2" =>
  100. # ( "socket" => socket_dir + "/someapp2-fcgi.socket",
  101. # "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
  102. # "bin-environment" => (
  103. # "RAILS_ENV" => "production",
  104. # "TMP" => home_dir + "/rails/someapp2",
  105. # ),
  106. # "strip-request-uri" => "/someapp2/"
  107. # )
  108. # )
  109. # )
  110. # }
  111. #}
  112. ## chrooted webserver + external PHP
  113. ##
  114. ## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
  115. ##
  116. ## webserver chrooted to /srv/www/
  117. ## php running outside the chroot
  118. #
  119. fastcgi.server = (
  120. ".php" => ((
  121. "host" => "127.0.0.1",
  122. "port" => "2000",
  123. "docroot" => "/srv/www/htdocs/"
  124. )))
  125. #
  126. #server.chroot = "/srv/www"
  127. #server.document-root = "/servers/wwww.example.org/htdocs/"
  128. #
  129. ##
  130. #######################################################################