From: Jan Svitok Date: 2006-12-21T00:45:00+09:00 Subject: Re: apache2 + eruby problem On 12/20/06, Sam Waller wrote: > > I can get Apache2 on Ubuntu Edgy to execute ruby (.rb) files. But I'm having > trouble getting it to recognize .rhtml files. Here is the sites-available file. > > /etc/apache2/sites-available/www.site.local: > > > ServerAdmin webmaster@site.local > ServerName www.site.local > ServerAlias site.local > AddHandler cgi-script .rb > AddType application/x-httpd-eruby .rhtml > DirectoryIndex index.php > DocumentRoot /var/www/site > ScriptAlias /cgi-bin/ /var/www/site/ > > Options +ExecCGI > > ErrorLog /var/www/site/logs/error.log > CustomLog /var/www/site/logs/access.log combined > > > I installed eruby and have /usr/sbin/eruby in my path. I'm trying to get a > ruby hit counter embedded in html format files, so I think that I'd need > eruby to do that. If I try opening test.rhtml the browser wants to open it > as text or download it. Here is test.rhtml: > > > > > eruby test > > >
>

eruby test

>

> <% print "hello world" %> >

>
> > > > Can someone explain how to get .rhtml files working with Apache2? > > thanks, > Sam Try searching the archive for eruby apache ;-) For me, it found ~13 threads (not of them useful, though) Most probably you'll need to set the mime type and handler for rhtml http://www.hiveminds.co.uk/node/3094 is a howto for windows.