Simple VH Setup

#1
Hi everyone!

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!

Jay
 
#2
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:

http://localhost

works fine. But looking at:

http://localhost/hello

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?

Thanks
Jay
 
#3
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:

http://localhost/test/

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...

Cheers
Jay
 
#4
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.

Thanks
Jay
 
#5
Solved??

Howdy! Okay I think I fixed it, by following the troubleshooting steps I just found (but should probably have found earlier):

Troubleshoot Me Now!

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!

Good stuff!!
 
Top