Phusion Passenger users guide, Apache version ============================================= image:images/phusion_banner.png[link="http://www.phusion.nl/"] This is the old, deprecated Passenger for Apache 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-based Ruby application == This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ === Tutorial/example: writing and deploying a Hello World Rack application === This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ === Deploying to a virtual host's root === This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ [[deploying_rack_to_sub_uri]] === Deploying to a sub URI === This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ === Redeploying (restarting the Rack application) === This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/restart_app.html === Rackup specifications for various web frameworks === include::users_guide_snippets/rackup_specifications.txt[] == Deploying a WSGI (Python) application This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ === Tutorial/example: writing and deploying a Hello World WSGI application === This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ === Deploying to a virtual host's root === This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ [[deploying_python_to_sub_uri]] === Deploying to a sub URI === This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ === Redeploying (restarting the WSGI application) === This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/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/apache/ == Deploying a Meteor application This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/ == Configuring Phusion Passenger == This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/ [[PassengerRoot]] === PassengerRoot === This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerroot [[PassengerDefaultRuby]] === PassengerDefaultRuby === This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerdefaultruby === Deployment options [[PassengerEnabled]] ==== PassengerEnabled This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerenabled [[PassengerBaseURI]] ==== PassengerBaseURI ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerbaseuri === Application loading options [[PassengerRuby]] ==== PassengerRuby This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerruby ==== PassengerPython This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerpython ==== PassengerNodejs This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengernodejs ==== PassengerMeteorAppSettings This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermeteorappsettings [[PassengerAppEnv]] ==== PassengerAppEnv ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerappenv [[rails_env]] ==== RailsEnv ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsenv-rackenv [[rack_env]] ==== RackEnv ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsenv-rackenv [[PassengerAppRoot]] ==== PassengerAppRoot This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerapproot [[PassengerAppGroupName]] ==== PassengerAppGroupName This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerappgroupname [[PassengerAppType]] ==== PassengerAppType This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerapptype [[PassengerStartupFile]] ==== PassengerStartupFile This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerstartupfile ==== PassengerRestartDir This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerrestartdir [[PassengerSpawnMethod]] ==== PassengerSpawnMethod This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerspawnmethod [[PassengerLoadShellEnvvars]] ==== PassengerLoadShellEnvvars This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerloadshellenvvars [[PassengerRollingRestarts]] ==== PassengerRollingRestarts This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerrollingrestarts [[PassengerResistDeploymentErrors]] ==== PassengerResistDeploymentErrors This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerresistdeploymenterrors === Security options === [[PassengerUserSwitching]] ==== PassengerUserSwitching ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengeruserswitching [[PassengerUser]] ==== PassengerUser ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengeruser [[PassengerGroup]] ==== PassengerGroup ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengergroup [[PassengerDefaultUser]] ==== PassengerDefaultUser ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerdefaultuser [[PassengerDefaultGroup]] ==== PassengerDefaultGroup ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerdefaultgroup [[PassengerFriendlyErrorPages]] ==== PassengerFriendlyErrorPages ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerfriendlyerrorpages === Resource control and optimization options === [[PassengerMaxPoolSize]] ==== PassengerMaxPoolSize ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxpoolsize [[PassengerMinInstances]] ==== PassengerMinInstances ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermininstances [[PassengerMaxInstances]] ==== PassengerMaxInstances ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxinstances ==== PassengerMaxInstancesPerApp ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxinstancesperapp [[PassengerPoolIdleTime]] ==== PassengerPoolIdleTime ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerpoolidletime [[PassengerMaxPreloaderIdleTime]] ==== PassengerMaxPreloaderIdleTime ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxpreloaderidletime ==== PassengerStartTimeout ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerstarttimeout [[PassengerConcurrencyModel]] ==== PassengerConcurrencyModel ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerconcurrencymodel [[PassengerThreadCount]] ==== PassengerThreadCount ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerthreadcount [[PassengerMaxRequests]] ==== PassengerMaxRequests ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxrequests [[PassengerMaxRequestTime]] ==== PassengerMaxRequestTime ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxrequesttime [[PassengerMemoryLimit]] ==== PassengerMemoryLimit ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermemorylimit ==== PassengerStatThrottleRate ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerstatthrottlerate [[PassengerPreStart]] ==== PassengerPreStart ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerprestart [[PassengerHighPerformance]] ==== PassengerHighPerformance ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerhighperformance ///////////////////////////////////////// ///////////////////////////////////////// === Connection handling options === [[PassengerBufferUpload]] ==== PassengerBufferUpload ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerbufferupload [[PassengerBufferResponse]] ==== PassengerBufferResponse ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerbufferresponse [[PassengerResponseBufferHighWatermark]] ==== PassengerResponseBufferHighWatermark This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerresponsebufferhighwatermark [[PassengerErrorOverride]] ==== PassengerErrorOverride ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengererroroverride [[PassengerMaxRequestQueueSize]] ==== PassengerMaxRequestQueueSize ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxrequestqueuesize [[PassengerStickySessions]] ==== PassengerStickySessions This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerstickysessions [[PassengerStickySessionsCookieName]] ==== PassengerStickySessionsCookieName This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerstickysessionscookiename === Compatibility options === [[PassengerResolveSymlinksInDocumentRoot]] ==== PassengerResolveSymlinksInDocumentRoot ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerresolvesymlinksindocumentroot ==== PassengerAllowEncodedSlashes ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerallowencodedslashes === Logging and debugging options === [[PassengerLogLevel]] ==== PassengerLogLevel ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerloglevel [[PassengerLogFile]] ==== PassengerLogFile ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerlogfile ==== PassengerFileDescriptorLogFile This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerfiledescriptorlogfile ==== PassengerDebugger ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerdebugger === Advanced options [[PassengerInstanceRegistryDir]] ==== PassengerInstanceRegistryDir This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerinstanceregistrydir [[PassengerDataBufferDir]] ==== PassengerDataBufferDir This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerdatabufferdir === Deprecated or removed options === ==== RailsRuby ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsruby ==== RailsBaseURI and RackBaseURI ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsbaseuri-rackbaseuri ==== RailsUserSwitching ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsuserswitching ==== RailsDefaultUser ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsdefaultuser ==== RailsAllowModRewrite ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsallowmodrewrite ==== RailsSpawnMethod ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsspawnmethod ==== RailsAutoDetect, RackAutoDetect and WsgiAutoDetect ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsautodetect-rackautodetect-and-wsgiautodetect ==== RailsAppSpawnerIdleTime ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsappspawneridletime ==== RailsFrameworkSpawnerIdleTime ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#railsframeworkspawneridletime ==== PassengerDebugLogFile ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/reference/#passengerdebuglogfile [[troubleshooting]] == Troubleshooting include::users_guide_snippets/troubleshooting/default.txt[] === OS X: The installer cannot locate MAMP's Apache This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=os-x-the-installer-cannot-locate-mamp-s-apache === Apache reports a "403 Forbidden" error This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=static-assets-such-as-images-and-stylesheets-aren-t-being-displayed === Static assets such as images and stylesheets aren't being displayed This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=static-assets-such-as-images-and-stylesheets-aren-t-being-displayed [[apache_selinux_permissions]] === Apache cannot access my app's files because of SELinux errors This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=apache-cannot-access-my-app-s-files-because-of-selinux-errors === The application thinks its not on SSL even though it is This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=the-application-thinks-its-not-on-ssl-even-though-it-is include::users_guide_snippets/troubleshooting/rails.txt[] [[conflicting_apache_modules]] === Conflicting Apache modules === ==== mod_userdir ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=conflicting-apache-modules ==== MultiViews (mod_negotiation) ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=conflicting-apache-modules ==== VirtualDocumentRoot ==== This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=conflicting-apache-modules == Analysis and system maintenance == include::users_guide_snippets/analysis_and_system_maintenance.txt[] == Tips == include::users_guide_snippets/tips.txt[] === X-Sendfile support === Phusion Passenger does not provide X-Sendfile support by itself. Please install link:http://tn123.ath.cx/mod_xsendfile/[mod_xsendfile] for X-Sendfile support. === Upload progress === Phusion Passenger does not provide upload progress support by itself. Please try drogus's link:http://github.com/drogus/apache-upload-progress-module/tree/master[ Apache upload progress module] instead. == Under the hood == Phusion Passenger hides a lot of complexity for the end user (i.e. the web server system administrator), but sometimes it is desirable to know what is going on. This section describes a few things that Phusion Passenger does 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[] === Static assets serving === Phusion Passenger accelerates serving of static files. This means that, if an URI maps to a file that exists, then Phusion Passenger will let Apache serve that file directly, without hitting the web application. Phusion Passenger does all this without the need for any mod_rewrite rules. People who are switching from an old Mongrel-based setup might have mod_rewrite rules such as these: ------------------------------------------------------------ # Check whether this request has a corresponding file; if that # exists, let Apache serve it, otherwise forward the request to # Mongrel. RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ balancer://mongrel%{REQUEST_URI} [P,QSA,L] ------------------------------------------------------------ These kind of mod_rewrite rules are no longer required, and you can safely remove them. [[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/apache/ 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[]