Question

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.

Was it helpful?

Solution

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

OTHER TIPS

Dont see why you cant configure lighttp as a reverse proxy for a mongrel cluster or even use nginx with passenger

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top