
8th March 2007, 09:53
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
general ruby on rails and server setup questions
hello,
I successfully implemented ruby on rails with the tutorial from howtoforge for debian, running on a debian 3.1 machine.
users also have chrooted ssh access.
one problem I have, is that a client is constantly complaining, that as he tells me his site is running in production mode, and to see changes he made, he asks me to do a killall dispatch.fcgi after each of his changes so they reflect in the online version.
this seems dubious to me but he explained, he needs a killall after every change because in production mode changes are not reflected without reload...
Now I am wondering how to fix his problem without compromising security... all dispatch.fcgi processes are running as the www-data user
What is the way to go? Could somehow tell me how they solved this? did anyone get the suexec wrapper to work with ruby on rails?
I also noticed that I am still running fastcgi not fcgid also I have both modules enabled inside apache2 but if I disable fastcgi the site stops working, so I need some help with that too :-(
falko or tim are you interested in giving paid support?
anyone else got some tips and tricks on this subject?
|

8th March 2007, 10:03
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
regarding the use of mod_fcgid:
I already did these steps:
We will also need to modify the .htaccess file in the same directory. You'll have to search for the line:
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
replacing it with:
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
If you use mod-fcgid instead of mod-fastcgi, you will have to change the following line too, in .htaccess:
AddHandler fastcgi-script .fcgi
replacing it with:
AddHandler fcgid-script .fcgi
|

8th March 2007, 10:43
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
I also found this on their original homepage:
http://fastcgi.coremail.cn/configuration.htm#Ruby
the problem is I have done all that is suggested to get mod_fcgid running, but nevertheless when I a2endismod fastcgi and force-reload apache2 the site stops working...
I am especially unsure about this line, as to where to add it:
FCGIWrapper '/usr/bin/ruby /var/www/web2/web/dispatch.fcgi' .fcgi
with fastcgi I used this line inside /etc/apache2/mods-enabled/fastcgi.conf:
FastCgiServer /var/www/web2/web/dispatch.fcgi -idle-timeout 120 -processes 2
|

8th March 2007, 12:21
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
I read another tutorial for having apache2 serve static content + php and proxy ror apps to a mongrel server. http://www.debian-administration.org/articles/495
but this would mean, I set up the proxying for the ROR sites, and the users have to manually start their own mongrel server? this smells like trouble, too much control and responsibility on the users side...
open for other suggestions...
|

12th March 2007, 13:18
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
common guys, is there nobody here offering hosting + ruby on rails?
whats your solution? how do you do it?
|

13th March 2007, 18:47
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
Quote:
|
Originally Posted by Tenaka
common guys, is there nobody here offering hosting + ruby on rails?
|
At least I don't...
|

16th March 2007, 12:43
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
ok, I tried to give those users that use ruby the possibility to killall dispatch.fcgi which means the ruby process will be restarted. I tried to do it with sudoers but it does not work out.
web2_test ALL=NOPASSWD: /usr/bin/killall dispatch.fcgi
but when I do a su web2_test and do a killall dispatch.fcgi I get this:
Quote:
web2_test@h898552:/var/www/web26/web$ killall dispatch.fcgi
dispatch.fcgi(12349): Operation not permitted
dispatch.fcgi(26029): Operation not permitted
dispatch.fcgi(27245): Operation not permitted
dispatch.fcgi(12912): Operation not permitted
dispatch.fcgi(32262): Operation not permitted
dispatch.fcgi(3281): Operation not permitted
dispatch.fcgi(598): Operation not permitted
dispatch.fcgi(16887): Operation not permitted
dispatch.fcgi(1737): Operation not permitted
dispatch.fcgi(1738): Operation not permitted
dispatch.fcgi(1739): Operation not permitted
dispatch.fcgi(1740): Operation not permitted
dispatch.fcgi: no process killed
|
any other ideas how to solve this?
|

21st August 2007, 17:31
|
|
Junior Member
|
|
Join Date: Feb 2007
Location: Buenos Aires, Argentina
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi Tenaka,
first sorry for my english,
I saw that you tried to give the user the posibility to killall fcgi instances, now I want to make the same, did you can resolved this issue???
I think the problem is that the fcgi instance is started by www-data user, then I want to find the way to start the process by each one of the web users..
regards
gabriel
|

24th August 2007, 09:53
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 1,186
Thanks: 60
Thanked 13 Times in 11 Posts
|
|
I remember there was a way to pass user and group to ruby, I just remember it did not work out for me but I can't rememebr more than this
|
| 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 +2. The time now is 00:19.
|
Recent comments
1 day 27 min ago
1 day 32 min ago
1 day 5 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 18 hours ago
2 days 1 hour ago
2 days 5 hours ago
2 days 6 hours ago