Annotation of elwix/config/etc/default/lighttpd/conf.d/fastcgi.conf, revision 1.1.2.2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>