I would like to start another process when mongrel rails starts up. Is there a way to do this? I am looking to start lighttpd which acts as a media server on my project every time rails starts and stop it every time rails stops.
Asked
Active
Viewed 264 times
3 Answers
1
Write a new init script for starting lighttpd when you start the mongrel cluster. Set it to be executable and place it where your other init scripts reside (/etc/init.d/ on Debian based distributions).
- Start: Start the mongrel cluster and start lighttpd
- Stop: Stop the mongrel cluster and stop lighttpd
- Restart: Stop and start

Tate Johnson
- 3,910
- 1
- 23
- 21
-
You're right, rather than trying to sneak code into mongrel starting up, I need to write something that starts mongrel + lighttpd and then stops them together. This is the right idea. Thank you. – Jul 26 '09 at 05:02
0
Dont see why you cant configure lighttp as a reverse proxy for a mongrel cluster or even use nginx with passenger

Omar Qureshi
- 8,963
- 3
- 33
- 35
0
If you use nginx/Apache (nginx is my preference) to run your app on passenger then why couldn't your chosen web server just serve your static files?

nitecoder
- 5,496
- 1
- 28
- 35