bitpiston / oyster

A Perl web application framework.
Other
3 stars 1 forks source link

Add example configurations of lighttpd and supervisord #50

Open einkoro opened 11 years ago

einkoro commented 11 years ago

supervisord:

[fcgi-program:bitpiston]
socket          = unix:///var/run/chowder/%(program_name)s.sock
socket_mode     = 0766
process_name    = %(program_name)s_%(process_num)s
command         = /home/bitpiston/chowder/shared/oyster.fcgi
directory       = /home/bitpiston/chowder/shared 
numprocs        = 3
user            = www
environment     = oyster_site_id=bitpiston
redirect_stderr = true
priority        = 500
startsecs       = 3 
startretries    = 10

[program:lighttpd]
command         = /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd/lighttpd.conf -D
redirect_stderr = true
priority        = 600
startretries    = 10

[program:mysql]
command         = /usr/local/bin/pidproxy /var/run/mysql/mysqld.pid /usr/local/bin/mysqld_safe --pid-file=/var/run/mysql/mysqld.pid
user            = mysql
redirect_stderr = true
priority        = 200
startretries    = 10

http://supervisord.org/ The FreeBSD port is sys-util/py-supervisor

Lighttpd 1.5:

$HTTP["host"] =~ "(^www\.|^)bitpiston\.com" {
  server.document-root              = "/home/bitpiston/www/"
  alias.url                         = ( 
                                         "/styles" => "/home/bitpiston/chowder/bitpiston/styles/",
                                         "/files" => "/home/bitpiston/chowder/bitpiston/files/"
                                      )
  setenv.add-environment            = ( "oyster_site_id" => "bitpiston" ) 
  $HTTP["url"] =~ "\.fcgi$" {
        proxy-core.balancer         = "round-robin"
        proxy-core.allow-x-sendfile = "enable"
        proxy-core.protocol         = "fastcgi"
        proxy-core.backends         = ( "unix:/var/run/chowder/bitpiston.sock" )
        proxy-core.max-pool-size    = 3
  }
  server.error-handler-404          = "/home/bitpiston/chowder/shared/oyster.fcgi"
}

Lighttpd 1.4:

$HTTP["host"] =~ "(^www\.|^)bitpiston\.com" {
  server.name               = "bitpiston.com"
  server.document-root      = "/home/bitpiston/www/"
  server.error-handler-404  = "/oyster.fcgi"
  alias.url                 = (
                                "/styles/" => "/home/bitpiston/chowder/bitpiston/styles/",
                                "/files/"  => "/home/bitpiston/chowder/bitpiston/files/"
                              )
  fastcgi.server            = ( ".fcgi" =>
                                ( "bitpiston" =>
                                  (
                                    "socket"      => "/var/run/chowder/bitpiston.sock",
                                    "check-local" => "disable",
                                  )
                                )
                              )
}