How to Stop Phusion Passenger

2019-04-15 11:55发布

问题:

I use the Phusion Passenger module (mod_passenger) for the Apache HTTP Server and Capistrano for deployment of rails applications.

I want to 'stop' a Ruby on Rails application from Phusion Passenger. How can i do that?

Thanks in advance

回答1:

You can't stop it without editing the Apache config and taking out or commenting out the VirtualHost block for the Rails application and then restarting the Apache server.



回答2:

Do you want to stop it for good? Edit the apache conf file, change the DocumentRoot of the virtual host to not point to a Rails installation, then apachectl graceful.

If you want to fully start and stop your Rails app via Capistrano, you can write some simple cap tasks that basically do what I outlined above: log in, edit the conf file, and restart apache.



回答3:

I did:

sudo a2dissite

Then I wrote the name of the Rails site and hit enter. After that, I reloaded Apache:

sudo service apache2 reload