Phusion Passenger is a fast web application server for Ruby, Node.js, and Python web applications.
Nginx Server Block Configuration
server {
listen 80;
server_name www.example.com;
# Point root directory to application 'public' directory
root /var/www/myapp/public;
# Turn on Passenger
passenger_enabled on;
passenger_ruby /usr/bin/ruby;
# Environment mode (production / development)
passenger_app_env production;
# Node.js or Python application options (if applicable)
# passenger_app_type node;
# passenger_startup_file app.js;
}
Application Restarts
Restart application without stopping web server:
# Touch restart.txt to trigger rolling reload
mkdir -p /var/www/myapp/tmp
touch /var/www/myapp/tmp/restart.txt
CLI Management Commands
# Inspect running Passenger processes and memory
passenger-status
# View process tree and requests queue
passenger-memory-stats
# Restart application via CLI
passenger-config restart-app /var/www/myapp
```\n