View Full Version : Simple VH Setup
08-07-2007, 03:19 AM
I'm new to LiteSpeed and Rails so please go easy on me :)
I've just setup LiteSpeed by following the "4 minute run-thru" by Bob Silva. I've followed all the steps as he did them, created a simple RoR handler and attempted to run it on port 80. But it doesn't work - it just shows the usual "Unable to connect" screen you'd get if the server wasn't running.
Does anyone know what I might have done wrong? I know this is a VERY vague description but I don't know what other detail to give. The admin interface (port 81) works fine, so I know the server is running. Not sure why it isn't serving my requests on port 80 though.
Any help would be appreciated - thanks!
08-07-2007, 05:26 AM
Okay so I've managed to get a RoR virtual host up and running. However, I can't get the "Hello World" application to work as expected; looking at:
works fine. But looking at:
gives the following error:
"We're sorry, but something went wrong"
which I think is a 500 error? Running the same RoR handler through WEBrick works fine.
Anyway, does anyone know why this might be happening? It is probably a simple config issue, but I can't see anything I have done wrong?
08-07-2007, 05:37 AM
Just another bit of an update :)
I've added a 'test' dir to the 'public' Rails dir and copied the index.html file into here and hence tested the following URL:
which works fine, so I guess it is an issue with a) the web server not calling the rails app for the 'hello' dir b) the rails app not being configured correctly to return from the 'hello' controller.
Also, just a note - I am using the EasyRailsWithSUExec VHTemplate, which came configured with LiteSpeed. I have made any changes to this template - I'm assuming my settings are such that this should just work. Hmmm...
08-07-2007, 06:52 AM
Another update :) I've removed the index.html file from 'public' and added the following line to routes.rb:
map.connect '', :controller => "hello"
So now accessing http://localhost/ should show the output from the 'hello' controller. Using WEBrick this is exactly what happens. However, using LiteSpeed I still get the 500 error described above.
08-07-2007, 07:04 AM
Howdy! Okay I think I fixed it, by following the troubleshooting steps I just found (but should probably have found earlier):
Troubleshoot Me Now! (http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:rails:troubleshoot)
Anyway, so I ran the WEBrick server as user 'nobody' and received the same error as I have been receiving under LiteSpeed. So I changed the permissions on all the files in my app and it is now all working!
08-07-2007, 01:26 PM
Im glad to see that you have it working now.