LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Ruby/Rails (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=20)
-   -   LiteSpeed 2.1.12 Standard with Rails... (http://www.litespeedtech.com/support/forum/showthread.php?t=395)

hugemikeyd 03-08-2006 10:12 PM

LiteSpeed 2.1.12 Standard with Rails...
 
I am having an issue with getting Ruby On Rails to run properly with the server. Everything works fine from within WEBrick, but not with LiteSpeed. I followed a set of directions i found on the web to a T, but things are not working as they should. From what i have gathered, the rewrites are not working correctly and the dispatcher.fcgi is having difficulty processing the request. I always get a timeout error from the server. Also, i cannot just go to the index of the host, i need to have index.html to make the index show, but the view enironment setting does not work properly. I also tried creating a new controller and that does not process either. Is there a simple way for me to post my configuration?

Thanks to all for any information :)

mistwang 03-09-2006 08:22 AM

Some quick notes regarding Rails:

1. turn off persistent connection for the dispatch.fcgi, Ruby's fcgi interface does not support persistent FCGI connection.

2. Turn on .htacess support at both vhost and server level to make the rewrite rule in public/.htaccess work properly. You probably did not turn it on at server level.

3. Once the rewrite rule works, index.html should work properly. You can also add "index.html" as a index page for that vhost.

hugemikeyd 03-09-2006 09:22 AM

i had already turned off the persistant connection with the fcgi, as i had read that it wouldn't work at all if that option was enabled.

Also, for the rewrite rules, i moved them into the configuration of the server:
Code:

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

but i will give it a shot with your way[/code]

mistwang 03-09-2006 09:33 AM

The rewrite rules will be slightly different when configured at vhost level, Both matching URL and target URL should be full URL, not relative URLs. It should work if you fix the URLs.

hugemikeyd 03-09-2006 10:17 AM

yes that did indeed work!

man that was easy lol, thanks for your help :D

hugemikeyd 03-09-2006 02:08 PM

i take it back, now only the index.html rewrite is working, nothing else...

mistwang 03-09-2006 02:31 PM

Have you change the last line of rewrite rule to

Code:

RewriteRule ^(.*)$ /dispatch.fcgi [QSA,L]
Have you defined a FCGI context with URI /dispatch.fcgi and pointing it to the dispatch.fcgi application?

hugemikeyd 03-09-2006 05:35 PM

yes i have done that and i just realized that i did not have fcgi installed, so i compiled that and i am still in the same spot. Am i supposed to create a script handler at the server level like php is set up?

mistwang 03-10-2006 09:35 AM

No need to configure a script handler, just defined a FCGI context with URI /dispatch.fcgi and pointing it to the dispatch.fcgi application.

hugemikeyd 03-17-2006 01:48 PM

I know that it has been a week but i continued to play with it all and it all works beautifly!

I am seeing 50 requests per second with a basic rails page, this is on the standard server vs. around 30 for Lighttpd, i am extremely impressed with the performance of this sever...

Thanks again for all of your help :D


All times are GMT -7. The time now is 07:25 AM.