Re: ruby in html files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, that behavior is absulute correct,
I was a bit confused...


Zoran Kikic schrieb:
Hello,

my setup works so far but ruby in html files works only
when I add the following 2 lines not only in
<IfModule mod_ruby.c> but outside of it too.

SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance

That's bad because when I try then to acces the index directory
"http://xyz.local/";
I get a "500 Internal Server Error error" and these logs:

[error] mod_ruby: /usr/lib/ruby/1.8/apache/eruby-run.rb:101:in `compile_file': /srv/www/error/HTTP_INTERNAL_SERVER_ERROR.html.var:453:missing end delimiter (ERuby::CompileError) [error] mod_ruby: from /usr/lib/ruby/1.8/apache/eruby-run.rb:101:in `compile'
[error] mod_ruby:   from /usr/lib/ruby/1.8/apache/eruby-run.rb:99:in `open'
[error] mod_ruby: from /usr/lib/ruby/1.8/apache/eruby-run.rb:99:in `compile' [error] mod_ruby: from /usr/lib/ruby/1.8/apache/eruby-run.rb:69:in `handler'


When I try "http://xyz.local/index.html"; which contains ruby code
everything is fine.


Any hints?


Thanks
Zoran




-------------------------------------------------------------
### httpd.conf ############################
LoadModule ruby_module /usr/lib/apache/mod_ruby.so
AddType text/html .rhtml


<IfModule mod_ruby.c>
  RubyRequire apache/ruby-run
  <FilesMatch "\.rbx$">
    Options +ExecCGI
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </FilesMatch>

  RubyRequire apache/eruby-run
  <FilesMatch "\.rhtml$">
    SetHandler ruby-object
    RubyHandler Apache::ERubyRun.instance
  </FilesMatch>

    SetHandler ruby-object
    RubyHandler Apache::ERubyRun.instance
</IfModule>

Include /etc/apache/vhosts/*



### a vhost ##################################

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@xxxxxxxxx
    DocumentRoot /srv/www/htdocs/xyz.local
    ServerName xyz.local
    ServerAlias www.xyz.local
    ErrorLog /var/log/apache/xyz.local-error_log
    CustomLog /var/log/apache/xyz.local-access_log common

    DirectoryIndex index.html index.xhtml index.rhtml index.rbx

    <Directory /srv/www/htdocs/xyz.local>
      Options Indexes
      Options FollowSymlinks
      Options MultiViews
      Options ExecCGI
      AddType text/html .rhtml
      AllowOverride All
      order allow,deny
      allow from all
    </Directory>

</VirtualHost>






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux