|
|

11-08-2006, 10:00 AM
|
|
Member
|
|
Join Date: Nov 2006
Posts: 10
|
|
multiple rails apps on a single IP/top level domain
Is it possible to set up multiple rails apps on a single IP/top level domain?
My intention is to access multiple raisl apps like this:
http://127.0.0.1/app1
http://127.0.0.1/app2
http://127.0.0.1/app3
Can I do this, or do I have to create a sub domain for each?
Thanks for your time.
|

11-08-2006, 10:13 AM
|
|
Member
|
|
Join Date: Nov 2006
Posts: 10
|
|
|
Ahh...I think I fugured it out. You create a plain old vhost, go to the Context menu, then add a new context of type Rails. Right?
|

11-08-2006, 10:30 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
That's correct!
|

11-08-2006, 10:53 AM
|
|
Member
|
|
Join Date: Nov 2006
Posts: 10
|
|
|
Well that was pretty painless.
I have a permission problem now, or at least I think it is, and I'm not sure how to fix it.
I can access static content in the Rails public folder, but when I try to do something Rails specific I get an error. I took a peek in the rails dev log and I see "permission denied - /home/ubuntu/dev/myapp/config/../tmp/sessions//ruby_sess.1022f62520257af". Then a stack trace to a bunch of exceptions in rails actionpack, mostly to do with session objects.
If this is a permssion problem, I'm not sure who to give them to and what kind.
I'm pretty new to linux, all of my rails development has been done on Windows. I've got a lot done over the past few days, but so many new things are being thrown at me I get a little stuck sometimes. I did manage to get Ubuntu, Litespeed, MySQL, rails, ruby, a bunch of gems installed without any trouble. So far the learning curve has been alright.
|

11-08-2006, 10:57 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
You need to change the ownership of /home/ubuntu/dev/myapp/tmp/ to the same as that of public/ folder.
You are doing well. :-)
|

11-08-2006, 11:09 AM
|
|
Member
|
|
Join Date: Nov 2006
Posts: 10
|
|
|
thanks. ya..it was time to bite the bullet and get a proper dev box running. I was using Cygwin but I found a lot of things I needed wouldn't compile.
Ok, I checked the folder ownership and both 'public' and 'tmp' have the same file owner, file group and permission set which is 'ubuntu'.
'ubuntu' is the default user for the Ubuntu image I installed yesterday.
Just to I don't leave anything important out...so what I did was install Ubuntu, got all the tools installed and test (mysql, ruby..so on). Then I went to the command line, made a directory called 'dev', in my home directory. Ran 'rails myapp', just for a small test. Told Literserver about it. Lite server will serve the raisl app, but rails throws that exception when I click "About your application's environment" on the default page.
|

11-08-2006, 11:11 AM
|
|
Member
|
|
Join Date: Nov 2006
Posts: 10
|
|
|
i left out the current permissions..they are drwxr-xr-x
|

11-08-2006, 11:18 AM
|
|
Member
|
|
Join Date: Nov 2006
Posts: 10
|
|
|
I have a feeling that I'm stuck int he web-brick mode of thinking and not production thinking.
To deploy my internal apps with Litespeed, I'm probably supposed to place a copy of the rails app into a folder on the Ubuntu box, then change ownwership of /public and /tmp to the same user that Litespeed uses (I left it nobody, probably not the best joice).
Am I on the right track?
|

11-08-2006, 11:23 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
You can configure the vhost to run rails app in suEXEC mode, the user who own public/ folder, please check our wiki.
If it is not in suEXEC mode, change ownership to the user that lshttpd run as.
Just make the user that ruby run as can write to the temp folder.
|

11-08-2006, 11:36 AM
|
|
Member
|
|
Join Date: Nov 2006
Posts: 10
|
|
|
Sweet. It's working. That was pretty easy. Thanks for pointing me in the right direction.
Originally I read the wiky and I tried the suEXEC VH. It worked but I could only host one rails app per domain. I'm talking about setting up a new VH with EasyRailsWithSuSEXEC. Are you talking about someting else?
|
| Thread Tools |
|
|
| Display Modes |
Linear 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 10:07 PM.
|
|