Disabling Passenger without uninstalling it

You can temporarily unload (disable) Passenger from Apache, without uninstalling the Passenger files, so that Apache 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 Apache.

Edit your Apache configuration file(s) and comment out:

  • all Passenger configuration directives.
  • the LoadModule passenger_module directive.

For example, if your configuration file looks like this…

Listen *:80
NameVirtualHost *:80

LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so

PassengerRoot /somewhere/passenger/x.x.x
PassengerDefaultRuby /usr/bin/ruby
PassengerMaxPoolSize 10

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /webapps/foo/public
    RailsBaseURI /rails
</VirtualHost>

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

Listen *:80
NameVirtualHost *:80
....

# LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so

# PassengerRoot /somewhere/passenger/x.x.x
# PassengerDefaultRuby /usr/bin/ruby
# PassengerMaxPoolSize 10

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /webapps/foo/public
    # RailsBaseURI /rails
</VirtualHost>

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