You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Zoran Kikic <li...@zoran.name> on 2007/08/16 12:50:47 UTC
[users@httpd] ruby in html files
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@xyz.local
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] ruby in html files
Posted by Zoran Kikic <li...@zoran.name>.
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@xyz.local
> 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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org