ubuntu apache2 ruby libapache-mod-ruby怎么安装配置阿

Python/PHP/Perl 开发与设计
回复
hfh
帖子: 22
注册时间: 2005-04-17 22:47
送出感谢: 0
接收感谢: 0

ubuntu apache2 ruby libapache-mod-ruby怎么安装配置阿

#1

帖子 hfh » 2006-10-09 12:32

ubuntu apache2 ruby libapache-mod-ruby怎么安装配置阿
cut
帖子: 31
注册时间: 2005-10-15 12:24
送出感谢: 0
接收感谢: 0

#2

帖子 cut » 2006-10-12 16:51

参见http://wiki.modruby.net/en/?InstallGuide
以下是ruby.conf文件,将他保存到/etc/apache2/mod-avaibles.在/etc/apache2/mod-enable里建立符号连接。
RedirectMatch ^/ruby/?$ /ruby/index.rbx必须要加到<Location /ruby><Location>里面。

# If the ruby module is installed, this will be enabled.
<IfModule mod_ruby.c>
# for Apache::RubyRun
RubyRequire apache/ruby-run

# exec files under /ruby as ruby scripts.
<Location /ruby>
RedirectMatch ^/ruby/?$ /ruby/index.rbx
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
Options +ExecCGI
</Location>
<Directory /var/www/ruby>
Options ExecCGI
</Directory>
# 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
# </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
# </Location>

# # for debug
# RubyRequire auto-reload
</IfModule>
回复

回到 “Python/Php/Perl”