Skip to content

Instantly share code, notes, and snippets.

@zdavatz
Created January 25, 2012 08:06
Show Gist options
  • Select an option

  • Save zdavatz/1675308 to your computer and use it in GitHub Desktop.

Select an option

Save zdavatz/1675308 to your computer and use it in GitHub Desktop.

Revisions

  1. mjane created this gist Jan 13, 2012.
    52 changes: 52 additions & 0 deletions 21_mod_ruby.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,52 @@
    <IfDefine RUBY>
    LoadModule ruby_module modules/mod_ruby.so

    # taken from the example file
    # If the ruby module is installed, this will be enabled.
    # for Apache::RubyRun
    RubyRequire apache/ruby-run

    # exec files under /ruby as ruby scripts.
    <Location /ruby>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    Options ExecCGI
    </Location>

    # exec *.rbx as ruby scripts.
    <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    </Files>

    # for Apache::ERubyRun
    #RubyRequire apache/eruby-run

    # handle files under /eruby as eRuby files by eruby.
    #<Location /eruby>
    # SetHandler ruby-object
    # RubyHandler Apache::ERubyRun.instance
    # Options ExecCGI
    #</Location>

    # handle *.rhtml as eruby files.
    #<Files *.rhtml>
    # SetHandler ruby-object
    # RubyHandler Apache::ERubyRun.instance
    #</Files>

    # for Apache::ERbRun
    #RubyRequire apache/erb-run

    # handle files under /erb as eRuby files by ERb.
    #<Location /erb>
    # SetHandler ruby-object
    # RubyHandler Apache::ERbRun.instance
    # Options ExecCGI
    #</Location>

    # for debug
    #RubyRequire auto-reload
    </IfDefine>

    # vim: ts=4 filetype=apache