fastcgi.conf 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. #######################################################################
  2. ##
  3. ## FastCGI Module
  4. ## ---------------
  5. ##
  6. ## See https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI
  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. # "php-tcp" =>
  30. # (
  31. # "host" => "127.0.0.1",
  32. # "port" => 9999,
  33. # "check-local" => "disable",
  34. # "broken-scriptfilename" => "enable",
  35. # ),
  36. # "php-num-procs" =>
  37. # (
  38. # "socket" => socket_dir + "/php-fastcgi-2.socket",
  39. # "bin-path" => server_root + "/cgi-bin/php5",
  40. # "bin-environment" => (
  41. # "PHP_FCGI_CHILDREN" => "16",
  42. # "PHP_FCGI_MAX_REQUESTS" => "10000",
  43. # ),
  44. # "max-procs" => 5,
  45. # "broken-scriptfilename" => "enable",
  46. # ),
  47. # ),
  48. # )
  49. ##
  50. ## Ruby on Rails Example
  51. ##
  52. ## Normally you only run one Rails application on one vhost.
  53. ##
  54. #$HTTP["host"] == "rails1.example.com" {
  55. # server.document-root = server_root + "/rails/someapp/public"
  56. # server.error-handler-404 = "/dispatch.fcgi"
  57. # fastcgi.server = ( ".fcgi" =>
  58. # ("someapp" =>
  59. # ( "socket" => socket_dir + "/someapp-fcgi.socket",
  60. # "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
  61. # "bin-environment" => (
  62. # "RAILS_ENV" => "production",
  63. # "TMP" => home_dir + "/rails/someapp",
  64. # ),
  65. # )
  66. # )
  67. # )
  68. #}
  69. ##
  70. ## Another example with multiple rails applications on one vhost.
  71. ##
  72. ## https://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
  73. ##
  74. #$HTTP["host"] == "rails2.example.com" {
  75. # $HTTP["url"] =~ "^/someapp1" {
  76. # server.document-root = server_root + "/rails/someapp1/public"
  77. # server.error-handler-404 = "/dispatch.fcgi"
  78. # fastcgi.server = ( ".fcgi" =>
  79. # ("someapp1" =>
  80. # ( "socket" => socket_dir + "/someapp1-fcgi.socket",
  81. # "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
  82. # "bin-environment" => (
  83. # "RAILS_ENV" => "production",
  84. # "TMP" => home_dir + "/rails/someapp1",
  85. # ),
  86. # "strip-request-uri" => "/someapp1/"
  87. # )
  88. # )
  89. # )
  90. # }
  91. #
  92. # $HTTP["url"] =~ "^/someapp2" {
  93. # server.document-root = server_root + "/rails/someapp2/public"
  94. # server.error-handler-404 = "/dispatch.fcgi"
  95. # fastcgi.server = ( ".fcgi" =>
  96. # ("someapp2" =>
  97. # ( "socket" => socket_dir + "/someapp2-fcgi.socket",
  98. # "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
  99. # "bin-environment" => (
  100. # "RAILS_ENV" => "production",
  101. # "TMP" => home_dir + "/rails/someapp2",
  102. # ),
  103. # "strip-request-uri" => "/someapp2/"
  104. # )
  105. # )
  106. # )
  107. # }
  108. #}
  109. ## chrooted webserver + external PHP
  110. ##
  111. ## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
  112. ##
  113. ## webserver chrooted to /srv/www/
  114. ## php running outside the chroot
  115. #
  116. #fastcgi.server = (
  117. # ".php" => ((
  118. # "host" => "127.0.0.1",
  119. # "port" => "2000",
  120. # "docroot" => "/srv/www/servers/www.example.org/htdocs/"
  121. # )))
  122. #
  123. #server.chroot = "/srv/www"
  124. #server.document-root = "/servers/wwww.example.org/htdocs/"
  125. #
  126. ##
  127. #######################################################################