Disabling Passenger without uninstalling it

You can temporarily unload (disable) Passenger from Nginx, without uninstalling the Passenger files, so that Nginx behaves as if Passenger was never installed in the first place. This might be useful to you if – for example – you seem to be experiencing a problem caused by Passenger, but you want to make sure whether that's actually the case without having to go through the hassle of uninstalling Passenger completely. When disabled, Passenger will not occupy any memory or CPU or otherwise interfere with Nginx.

Edit your Nginx configuration file(s) and comment out all Passenger configuration directives.

For example, if your configuration file looks like this…

...

http {
    passenger_root /somewhere/passenger-x.x.x;
    passenger_ruby /usr/bin/ruby;
    passenger_max_pool_size 10;

    # If you are using our Debian packages then you may encounter this:
    include /etc/nginx/passenger.conf;

    gzip on;

    server {
        server_name www.foo.com;
        listen 80;
        root /webapps/foo/public;
        passenger_enabled on;
    }
}

…then comment out the relevant directives, so that it looks like this:

...

http {
    # passenger_root /somewhere/passenger-x.x.x;
    # passenger_ruby /usr/bin/ruby;
    # passenger_max_pool_size 10;

    # include /etc/nginx/passenger.conf;

    gzip on;

    server {
        server_name www.foo.com;
        listen 80;
        root /webapps/foo/public;
        # passenger_enabled on;
    }
}

After you've done this, save the configuration file and restart Nginx.