Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
litespeed_wiki:ruby:eruby [2015/07/29 14:10] Michael Alegre |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to setup eRuby ====== | ||
- | * download eRuby from [[http://www.modruby.net/en/index.rbx/eruby/download.html|modruby.net]]. | ||
- | * install eRuby by following the installation instrcution | ||
- | * copy eruby executable to your cgi-bin directory of your web site, you need to make sure all files under cgi-bin directory run as CGI script. To configure cgi-bin native with LSWS console, you need to add a CGI context with URI "/cgi-bin/", location is the cgi-bin directory. If you access URL /cgi-bin/eruby directly, you should get error page "500 Internal server error", it is normal. | ||
- | * add the follow rewrite rule at vhost level or in a .htaccess | ||
- | RewriteRule (.*\.rhtml)$ /cgi-bin/eruby/$1 | ||
- | |||
- | * create a test eruby script, for example test.rhtml under the document root. | ||
- | * access the test script from your browser: http://your.site/test.rhtml , the rhtml file will be parsed and rendered with /cgi-bin/eruby . | ||
- | |||
- | If it does not work, most likely your rewrite rule has not been configured properly. Your browser may cache the response, you need to clear your browser cache after changing LSWS configuration. |