Phusion Passenger users guide, Nginx version
============================================

image:images/phusion_banner.png[link="http://www.phusion.nl/"]

This is the old, deprecated Passenger for Nginx documentation. Please visit https://www.phusionpassenger.com/library/ for the new documentation.


== Support information

include::users_guide_snippets/support_information.txt[]

[[installation]]
== Installation

include::users_guide_snippets/installation.txt[]


[[deploying_a_rack_app]]
== Deploying a Rack-based Ruby application ==

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

=== Tutorial/example: writing and deploying a Hello World Rack application ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

=== Deploying to a virtual host's root ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

[[deploying_rack_to_sub_uri]]
=== Deploying to a sub URI ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

=== Redeploying (restarting the Rack application) ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/restart_app.html

=== Rackup specifications for various web frameworks ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/config_ru.html


[[deploying_a_wsgi_app]]
== Deploying a WSGI (Python) application

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

=== Tutorial/example: writing and deploying a Hello World WSGI application ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

=== Deploying to a virtual host's root ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

[[deploying_wsgi_to_sub_uri]]
=== Deploying to a sub URI ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/

=== Redeploying (restarting the WSGI application) ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/restart_app.html

=== Sample `passenger_wsgi.py` for Django

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/wsgi_spec.html


== Deploying a Node.js application

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/


== Deploying a Meteor application

This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/


== Configuring Phusion Passenger ==

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/

[[PassengerRoot]]
=== passenger_root <directory> ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_root

=== Deployment options

==== passenger_enabled <on|off>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_enabled

[[PassengerBaseURI]]
==== passenger_base_uri <uri>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_base_uri

[[PassengerDocumentRoot]]
==== passenger_document_root <path>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_document_root

=== Application loading options

[[PassengerRuby]]
==== passenger_ruby <filename>

This documentation has moved. Please visit  https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_ruby

==== passenger_python <filename>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_python

==== passenger_nodejs <filename>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_nodejs

==== passenger_meteor_app_settings <filename>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_meteor_app_settings-filename

[[PassengerAppEnv]]
==== passenger_app_env <string>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_app_env

[[RailsEnv]]
==== rails_env <string>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_app_env

[[RackEnv]]
==== rack_env <string>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_app_env

[[PassengerAppRoot]]
==== passenger_app_root <path/to/root>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_app_root

[[PassengerAppGroupName]]
==== passenger_app_group_name <name>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_app_group_name

[[PassengerAppType]]
==== passenger_app_type <name>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_app_type

[[PassengerStartupFile]]
==== passenger_startup_file <filename>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_startup_file

[[PassengerSpawnMethod]]
==== passenger_spawn_method <string>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_spawn_method

[[PassengerEnvVar]]
==== passenger_env_var <name> <value>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_env_var

[[PassengerLoadShellEnvvars]]
==== passenger_load_shell_envvars <on|off>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_load_shell_envvars

[[PassengerRollingRestarts]]
==== passenger_rolling_restarts <on|off>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_rolling_restarts

[[PassengerResistDeploymentErrors]]
==== passenger_resist_deployment_errors <on|off>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_resist_deployment_errors

=== Security options ===
[[PassengerUserSwitching]]
==== passenger_user_switching <on|off> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_user_switching

[[PassengerUser]]
==== passenger_user <username> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_user

[[PassengerGroup]]
==== passenger_group <group name> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_group

[[PassengerDefaultUser]]
==== passenger_default_user <username> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_default_user

[[PassengerDefaultGroup]]
==== Passenger_default_group <group name> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_default_group

==== passenger_show_version_in_header <on|off> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_show_version_in_header

[[PassengerFriendlyErrorPages]]
==== passenger_friendly_error_pages <on|off> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_friendly_error_pages

=== Resource control and optimization options ===
[[PassengerMaxPoolSize]]
==== passenger_max_pool_size <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_pool_size

[[PassengerMinInstances]]
==== passenger_min_instances <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_min_instances

[[PassengerMaxInstances]]
==== passenger_max_instances <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_instances

==== passenger_max_instances_per_app <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_instances_per_app

[[PassengerPoolIdleTime]]
==== passenger_pool_idle_time <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_pool_idle_time

==== passenger_max_preloader_idle_time <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_preloader_idle_time

==== passenger_start_timeout <seconds> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_start_timeout

[[PassengerConcurrencyModel]]
==== passenger_concurrency_model <process|thread> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_concurrency_model

[[PassengerThreadCount]]
==== passenger_thread_count <number> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_thread_count

[[PassengerMaxRequests]]
==== passenger_max_requests <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_requests

[[PassengerMaxRequestTime]]
==== passenger_max_request_time <seconds> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_request_time

[[PassengerMemoryLimit]]
==== passenger_memory_limit <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_memory_limit

==== passenger_stat_throttle_rate <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_stat_throttle_rate

[[PassengerPreStart]]
==== passenger_pre_start <url> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_pre_start


=== Connection handling options ===

[[PassengerSetHeader]]
==== passenger_set_header <HTTP header name> <value> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_set_header

[[passenger_max_request_queue_size]]
==== passenger_max_request_queue_size <number> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_request_queue_size

[[passenger_request_queue_overflow_status_code]]
==== passenger_request_queue_overflow_status_code <code> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_request_queue_overflow_status_code

[[PassengerStickySessions]]
==== passenger_sticky_sessions <on|off>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_sticky_sessions

[[PassengerStickySessionsCookieName]]
==== passenger_sticky_sessions_cookie_name

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_sticky_sessions_cookie_name

==== passenger_ignore_client_abort <on|off> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_ignore_client_abort

[[passenger_intercept_errors]]
==== passenger_intercept_errors <on|off> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_intercept_errors

==== passenger_pass_header <header name> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_pass_header-header-name

==== passenger_ignore_headers <header names...> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_ignore_headers

==== passenger_headers_hash_bucket_size <size> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_headers_hash_bucket_size

==== passenger_headers_hash_max_size <size> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_headers_hash_max_size

[[passenger_buffer_response]]
==== passenger_buffer_response <on|off> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_buffer_response

[[PassengerResponseBufferHighWatermark]]
==== passenger_response_buffer_high_watermark <bytes>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_response_buffer_high_watermark

==== passenger_buffer_size ====
==== passenger_buffers ====
==== passenger_busy_buffers_size ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_buffer_size-passenger_buffers-passenger_busy_buffers_size


=== Logging and debugging options ===

[[PassengerLogLevel]]
==== passenger_log_level <integer> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_log_level

[[PassengerLogFile]]
==== passenger_log_file <filename> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_log_file

==== PassengerFileDescriptorLogFile <filename>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_file_descriptor_log_file

==== passenger_debugger <on|off> ====

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_debugger


=== Advanced options

[[PassengerInstanceRegistryDir]]
==== passenger_instance_registry_dir <directory>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_instance_registry_dir

[[PassengerDataBufferDir]]
==== passenger_data_buffer_dir <directory>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_data_buffer_dir

==== passenger_fly_with <socket filename>

This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_fly_with


=== Deprecated or removed options ===

The following options have been deprecated or removed. Some are still supported for backwards
compatibility reasons.

==== rails_spawn_method ====
Deprecated in favor of <<PassengerSpawnMethod,passenger_spawn_method>>.

==== passenger_debug_log_file ====
This option has been renamed in version 5.0.5 to <<PassengerLogFile,passenger_log_file>>.


[[troubleshooting]]
== Troubleshooting ==

include::users_guide_snippets/troubleshooting/default.txt[]

=== The application thinks its not on SSL even though it is

This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/

include::users_guide_snippets/troubleshooting/rails.txt[]


== Analysis and system maintenance ==

include::users_guide_snippets/analysis_and_system_maintenance.txt[]


== Tips ==

include::users_guide_snippets/tips.txt[]


== Under the hood ==

include::users_guide_snippets/under_the_hood/page_caching_support.txt[]
include::users_guide_snippets/under_the_hood/relationship_with_ruby.txt[]

[[application_detection]]
=== How Phusion Passenger detects whether a virtual host is a web application ===

This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/app_autodetection/nginx/


include::users_guide_snippets/appendix_a_about.txt[]

include::users_guide_snippets/appendix_b_terminology.txt[]

include::users_guide_snippets/appendix_c_spawning_methods.txt[]

[[about_environment_variables]]
== Appendix D: About environment variables

include::users_guide_snippets/environment_variables.txt[]
