Moving Passenger to a different directory

If you installed Passenger through a source tarball then you can move the Passenger directory to another location. This is not possible if you used any of the other installation methods, such as APT, YUM or RubyGems.

First, move the directory to whereever you like:

Copy
mv /opt/passenger/passenger-5.0.12 /usr/local/passenger-5.0.12

Next, tell Nginx that Passenger has moved. Open your nginx configuration file and set the passenger_root directive to the new location.

Copy
passenger_root /usr/local/passenger-5.0.12;

Restart Nginx to finalize the change.

Finally, if you added Passenger's bin subdirectory to PATH by editing /etc/bashrc (or a related shell startup file), then you must update your PATH with the new location. Open /etc/bashrc (or /etc/bash.bashrc on some systems) and change:

Copy
export PATH=/opt/passenger/passenger-5.0.12/bin:$PATH

to:

Copy
export PATH=/usr/local/passenger-5.0.12/bin:$PATH

Finally, restart all your shell sessions to activate the PATH change.