Afficher un message
Vieux 30/12/2005, 15h08   #1
Une bévue
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut eruby mode_ruby et apache 1.3

"petit" pb avec apache 1.3.x et eruby.

j'ai installé mode_ruby et eruby sur ma bécanne.

mode_ruby foncionne j'ai testé un cgi "test" dans le répertoire
/path/to/www/ruby, c'est ok (<http://81.57.96.20/ruby/test>), de même
j'ai testé un cgi "test.rbx" à la racine /path/to/www c'est ok
(<http://81.57.96.20/test.rbx>), ça roule.

par contre, j'ai à la racine un "index.rhtml" que mon navigateur me
propose de télécharger (<http://81.57.96.20/index.rhtml >) au lieu de le
visualiser et, je ne pige pas pourquoi...

j'ajoute que dans le log apache, je n'ai PAS de message d'erreur... :
[Fri Dec 30 13:31:00 2005] [notice] Apache/1.3.33 (Darwin)
mod_ruby/1.2.4 Ruby/1.8.4(2005-12-24) PHP/5.0.4 configured -- resuming
normal operations
[Fri Dec 30 13:31:00 2005] [notice] Accept mutex: flock (Default: flock)


si quelqu'un a de la lumière...

--- mon setup ----------------------------------------------
MacOS X 10.4.3
Server version: Apache/1.3.33 (Darwin)

ruby 1.8.4
mod_ruby-1.2.4
eruby-1.0.5

dans /private/etc/httpd/httpd.conf j'ai ajouté :

j'ai mis mon root à /Users/yvon/Sites (pour éviter d'avoir un ~yvon qui
traine dans l'url...
les droits sur le chemin d'accès :
drwxr-xr-x 126 yvon yvon 4284 Dec 30 15:58 yvon
drwxr-xr-x 26 yvon yvon 884 Dec 30 12:32 Sites
-rwxr-xr-x 1 yvon yvon 1901 Dec 26 04:31 index.rhtml
------¨--^ me semblent être en "trop" ...

------------------------------------------------------------
# begin mode_ruby activation
Include /private/etc/httpd/additions/modruby.conf
# end mode_ruby activation
------------------------------------------------------------

j'ai donc créé un fichier /private/etc/httpd/additions/modruby.conf :
------------------------------------------------------------
LoadModule ruby_module /usr/libexec/httpd/mod_ruby.so


<IfDefine !APACHE2>
AddModule mod_ruby.c
</IfDefine>

<IfModule mod_ruby.c>
RubyRequire apache/ruby-run

# Excute files under /ruby as Ruby scripts
<Directory /Users/yvon/Sites/ruby>
Options ExecCGI
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Directory>

# Execute *.rbx files as Ruby scripts
<Files *.rbx>
Options ExecCGI
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>


<IfModule mod_ruby.c>
RubyRequire apache/eruby-run

AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby eruby

<IfModule mod_dir.c>
DirectoryIndex index.rhtml
</IfModule>

# Handle *.rhtml files as eRuby files
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
</IfModule>
------------------------------------------------------------

--
une bévue
  Réponse avec citation
 
Page generated in 0,05584 seconds with 9 queries