]> Sergey Matveev's repositories - public-inbox.git/commitdiff
examples/cgi-webrick.rb: set CGIPathEnv, update comments
authorEric Wong <e@80x24.org>
Sun, 28 Feb 2016 22:40:22 +0000 (22:40 +0000)
committerEric Wong <e@80x24.org>
Sun, 28 Feb 2016 23:58:05 +0000 (23:58 +0000)
webrick clears PATH otherwise, and we rely on git commands.

examples/cgi-webrick.rb

index 21e336d525877f4ab5e1da9fbb21c52ecdfb2c18..5554a012ba859fb88d180792230c548084b27784 100644 (file)
@@ -1,13 +1,16 @@
 #!/usr/bin/env ruby
 # Sample configuration using WEBrick, mainly intended dev/testing
 # for folks familiar with Ruby and not various Perl webserver
-# deployment options.
+# deployment options.  For those familiar with Perl web servers,
+# plackup(1) is recommended for development and public-inbox-httpd(1)
+# is our production deployment server.
 require 'webrick'
 require 'logger'
 options = {
   :BindAddress => '127.0.0.1',
   :Port => 8080,
   :Logger => Logger.new($stderr),
+  :CGIPathEnv => ENV['PATH'], # need to run 'git' commands
   :AccessLog => [
     [ Logger.new($stdout), WEBrick::AccessLog::COMBINED_LOG_FORMAT ]
   ],