|
|

03-08-2006, 10:12 PM
|
|
Member
|
|
Join Date: Mar 2006
Location: New York
Posts: 42
|
|
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 
|

03-09-2006, 08:22 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
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.
|

03-09-2006, 09:22 AM
|
|
Member
|
|
Join Date: Mar 2006
Location: New York
Posts: 42
|
|
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]
|

03-09-2006, 09:33 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
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.
|

03-09-2006, 10:17 AM
|
|
Member
|
|
Join Date: Mar 2006
Location: New York
Posts: 42
|
|
yes that did indeed work!
man that was easy lol, thanks for your help 
|

03-09-2006, 02:08 PM
|
|
Member
|
|
Join Date: Mar 2006
Location: New York
Posts: 42
|
|
|
i take it back, now only the index.html rewrite is working, nothing else...
|

03-09-2006, 02:31 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
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?
|

03-09-2006, 05:35 PM
|
|
Member
|
|
Join Date: Mar 2006
Location: New York
Posts: 42
|
|
|
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?
|

03-10-2006, 09:35 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
No need to configure a script handler, just defined a FCGI context with URI /dispatch.fcgi and pointing it to the dispatch.fcgi application.
|

03-17-2006, 01:48 PM
|
|
Member
|
|
Join Date: Mar 2006
Location: New York
Posts: 42
|
|
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 
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 06:10 PM.
|
|