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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > LSAPI and Shared Hosting not working

Reply
 
Thread Tools Display Modes
  #11  
Old 11-27-2012, 09:29 AM
andyf andyf is offline
Member
 
Join Date: Nov 2012
Posts: 11
Having done this, the request just returns:

Code:
403 Forbidden
Reply With Quote
  #12  
Old 11-27-2012, 10:39 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Please add following rewrite rules to .htaccess under public/ folder
Quote:
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
Reply With Quote
  #13  
Old 11-28-2012, 02:15 AM
andyf andyf is offline
Member
 
Join Date: Nov 2012
Posts: 11
I've tried this, and other .htaccess directives, but the .htaccess inside the app/public directory and also within the public_html root seems to be ignored.
Reply With Quote
  #14  
Old 11-29-2012, 06:34 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
403 status is triggered by
Quote:
Options -indexes
, instead, avoid using "-indexes", use
Quote:
Options <options needed ....,do not include "indexes">
.htaccess could be disabled by your server configuration.
Reply With Quote
  #15  
Old 11-30-2012, 03:34 AM
andyf andyf is offline
Member
 
Join Date: Nov 2012
Posts: 11
It's giving a 403 because I disabled indexes, as you suggested here. This had to be done on a global default level, since .htaccess in the public_html root is not considered by the server.

I should add this is a standard cPanel CentOS machine, running LSWS, if this helps.

Requesting any URL except the website root works, eg. /foo/bar results in a Rail error saying no route (as expected). Requesting / just results in a 403 due to Indexes being disabled. The request response headers in each case are different, it's clear to see that the request for the website root is not being processed by Rails (and indeed there are no ruby processes spawned by LSWS).
Reply With Quote
  #16  
Old 12-04-2012, 07:24 AM
andyf andyf is offline
Member
 
Join Date: Nov 2012
Posts: 11
Hi,

So considering indexes are disabled at the moment, should I be leaving them disabled, or enabling them. As it stands, any request for the web root (public_html) is not being passed to the Ruby LSAPI.
Reply With Quote
  #17  
Old 12-04-2012, 09:43 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
update to the latest 4.2.1 release may address this.

/usr/local/lsws/admin/misc/lsup.sh -f -v 4.2.1
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


All times are GMT -7. The time now is 11:02 AM.



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