File: install.en.rd

package info (click to toggle)
mod-ruby 1.2.6-2
  • links: PTS
  • area: main
  • in suites: lenny, squeeze, wheezy
  • size: 704 kB
  • ctags: 978
  • sloc: ansic: 6,779; ruby: 1,954; makefile: 77; sh: 16
file content (67 lines) | stat: -rw-r--r-- 1,337 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
=begin

= mod_ruby Install Guide

[((<Index|URL:index.en.html>))
|((<RD format|URL:install.en.rd>))]

* ((<Install>))
* ((<Configure Apache>))
* ((<Use eRuby>))

== Install

Install mod_ruby like this:

  $ tar zxvf mod_ruby-x.y.z.tar.gz
  $ cd mod_ruby-x.y.z/
  $ ./configure.rb --with-apxs=/usr/local/apache/bin/apxs
  $ make
  # make install

== Configure Apache

Add these lines to httpd.conf.

  LoadModule ruby_module /usr/local/apache/libexec/mod_ruby.so
  
  # ClearModuleList
  # AddModule mod_ruby.c

  <IfModule mod_ruby.c>
    RubyRequire apache/ruby-run
    
    # Excucute files under /ruby as Ruby scripts
    <Location /ruby>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    </Location>
    
    # Execute *.rbx files as Ruby scripts
    <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    </Files>
  </IfModule>

== Use eRuby

Install eruby, and add these lines to httpd.conf.

  <IfModule mod_ruby.c>
    RubyRequire apache/eruby-run
    
    # Handle files under /eruby as eRuby files
    <Location /eruby>
    SetHandler ruby-object
    RubyHandler Apache::ERubyRun.instance
    </Location>
    
    # Handle *.rhtml files as eRuby files
    <Files *.rhtml>
    SetHandler ruby-object
    RubyHandler Apache::ERubyRun.instance
    </Files>
  </IfModule>

=end