LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > LiteSpeed 2.1.12 Standard with Rails...

Reply
 
Thread Tools Display Modes
  #1  
Old 03-08-2006, 10:12 PM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
Default 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
Reply With Quote
  #2  
Old 03-09-2006, 08:22 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
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.
Reply With Quote
  #3  
Old 03-09-2006, 09:22 AM
hugemikeyd hugemikeyd is offline
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]
Reply With Quote
  #4  
Old 03-09-2006, 09:33 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
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.
Reply With Quote
  #5  
Old 03-09-2006, 10:17 AM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
yes that did indeed work!

man that was easy lol, thanks for your help
Reply With Quote
  #6  
Old 03-09-2006, 02:08 PM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
i take it back, now only the index.html rewrite is working, nothing else...
Reply With Quote
  #7  
Old 03-09-2006, 02:31 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
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?
Reply With Quote
  #8  
Old 03-09-2006, 05:35 PM
hugemikeyd hugemikeyd is offline
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?
Reply With Quote
  #9  
Old 03-10-2006, 09:35 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
No need to configure a script handler, just defined a FCGI context with URI /dispatch.fcgi and pointing it to the dispatch.fcgi application.
Reply With Quote
  #10  
Old 03-17-2006, 01:48 PM
hugemikeyd hugemikeyd is offline
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup for Rails via Litespeed Ruby LSAPI Justin Ruby/Rails 2 12-08-2007 07:19 PM
Standard 2.2.5 + LSAPI + Rails uses up all processes dirkbj Bug Reports 7 12-01-2006 08:52 AM
Problem installing LiteSpeed 2.2.1 Standard on UNIX perezsy Install/Configuration 17 09-22-2006 09:53 AM
Rails via Mongrel: Litespeed dies upon restart alaithea Ruby/Rails 8 05-16-2006 09:43 AM
Problems with Rails 1.1 and LiteSpeed marstall Ruby/Rails 2 03-29-2006 03:11 PM


All times are GMT -7. The time now is 12:08 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.