zachar
zachar

Reputation: 1095

How to remove nginx?

I installed nginx and passenger with the command:

rvmsudo passenger-install-nginx-module

Is there any nifty way to remove it easily?

Upvotes: 2

Views: 3918

Answers (2)

the Tin Man
the Tin Man

Reputation: 160581

Passenger's documentation discusses uninstalling:

To uninstall Phusion Passenger, please first remove all Phusion Passenger configuration directives from your web server configuration file(s). After you’ve done this, you need to remove the Phusion Passenger files.

  • If you installed Phusion Passenger through Homebrew, then run brew uninstall passenger.
  • If you installed Phusion Passenger via a Ruby gem, then run gem uninstall passenger (or, if you’re a Phusion Passenger Enterprise user, gem uninstall passenger-enterprise-server). You might have to run this as root.
  • If you installed Phusion Passenger via a source tarball, then remove the directory in which you placed the extracted Phusion Passenger files. This directory is the same as the one pointed to the by PassengerRoot/passenger_root configuration directive.
  • If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.

Nginx does not have to be recompiled after uninstalling Phusion Passenger. Altough Nginx will contain the Phusion Passenger Nginx module, the module will not do anything when all Phusion Passenger configuration directives are removed.

In other words, to disable Passenger just remove the configuration information from the nginx config file. At that point nginx will run without calling Passenger. The benefit is you don't have to reinstall nginx.

Upvotes: 0

Anthony Alberto
Anthony Alberto

Reputation: 10405

nginx should be self-contained in /opt/nginx or whatever path you chose during install.

You can just remove the folder and everything should be ok.

Edit : Or remove passenger altogether : gem uninstall passenger

Upvotes: 4

Related Questions