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.
+2
A:
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
2009-07-25 23:35:08
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.
nixterrimus
2009-07-26 05:02:50
A:
Dont see why you cant configure lighttp as a reverse proxy for a mongrel cluster or even use nginx with passenger
Omar Qureshi
2009-07-25 23:54:18
A:
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?
railsninja
2009-07-26 00:41:43