2 # Sample configuration using WEBrick, mainly intended dev/testing
3 # for folks familiar with Ruby and not various Perl webserver
4 # deployment options. For those familiar with Perl web servers,
5 # plackup(1) is recommended for development and public-inbox-httpd(1)
6 # is our production deployment server.
10 :BindAddress => '127.0.0.1',
12 :Logger => Logger.new($stderr),
13 :CGIPathEnv => ENV['PATH'], # need to run 'git' commands
15 [ Logger.new($stdout), WEBrick::AccessLog::COMBINED_LOG_FORMAT ]
18 server = WEBrick::HTTPServer.new(options)
20 WEBrick::HTTPServlet::CGIHandler,
21 "/var/www/cgi-bin/public-inbox.cgi")
22 ['INT', 'TERM'].each do |signal|
23 trap(signal) {exit!(0)}