{"id":2779,"date":"2022-08-01T00:56:00","date_gmt":"2022-08-01T06:56:00","guid":{"rendered":"https:\/\/www.supportpro.com\/blog\/?p=2779"},"modified":"2022-08-08T10:14:34","modified_gmt":"2022-08-08T16:14:34","slug":"phusion-passenger","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/phusion-passenger\/","title":{"rendered":"Phusion Passenger Server Explained\u00a0"},"content":{"rendered":"\n<p class=\"has-text-align-center\"><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Phusion Passenger is a free web server and application server with support for Ruby, Python and Node.js. It is designed to integrate into the Apache HTTP Server or the Nginx web server, but also has a mode for running standalone without an external web server.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Phusion Passenger supports Unix-like operating systems, and is available as a gem package, as a tarball, or as native Linux packages.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><b>Passenger and &#8220;Rails server&#8221; <\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">The Ruby on Rails framework provides a built-in server tool, which can be accessed with the <\/span><i><span style=\"font-weight: 400;\">&#8216;<\/span><\/i><b><i>rails server<\/i><\/b><i><span style=\"font-weight: 400;\">&#8216;<\/span><\/i><span style=\"font-weight: 400;\"> command. The &#8220;rails server&#8221; is not an application server by itself, but just a small wrapper that launches your application in an application server. This is why people do not use &#8220;rails server&#8221; in production. They use an application server such as Passenger directly.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Passenger is an open source web application server. It handles HTTP requests, manages processes and resources, and enables administration, monitoring and problem diagnosis.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Passenger is very easy to use, makes deploying in production much easier and is scalable.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><b>How Passenger fits in the stack<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">When you deploy your web app to production, there are all sorts of components involved. You may have heard of Unicorn, Puma, Nginx, Apache, and Capistrano. Passenger replaces some components while collaborating with other components.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">In a typical production stack, Nginx or Apache is used as the web server, Passenger as an application server, and Capistrano as a release automation tool. Passenger integrates with Nginx or Apache and manages the application and its resources.<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a class=\"lightbox\" href=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/09\/stack.png\" data-rel=\"penci-gallery-image-content\" ><img fetchpriority=\"high\" decoding=\"async\" width=\"342\" height=\"355\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/09\/stack.png\" alt=\"Passenger- application server-Capistrano-release automation tool\" class=\"wp-image-2780\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/09\/stack.png 342w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/09\/stack-289x300.png 289w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Security<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Passenger protects your web apps from various malicious attacks like slow client attacks, common HTTP parser exploits, and privilege escalations.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Documentation<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">A tool is only as good as its users are able to wield it. Passenger comes with world-class documentation to allow you to fully leverage its features.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Optimization<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Passenger was built with high performance and efficiency in mind. With Passenger\u2019s zero-copy architecture, turbocaching and support for multiple concurrency models, you can count on Passenger to get the most out of your hardware.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b> Stability<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Passenger auto-manages your apps\u2019 processes, restarting them and itself if they ever crash. Passenger also keeps resource hogging apps in check, giving your web app maximum uptime.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Reliability<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Passenger was battle-tested with some of the most demanding web apps for over a decade. This makes it one of the toughest app servers to date, currently powering over 650,000 web apps.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b> Polyglot<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Deploy your Ruby, Node.js, Meteor and\/or Python apps from one Passenger instance in seconds. You need not fiddle around with multiple app servers and proxies anymore.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Logs<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Passenger prints its own logs not only to the terminal but also to a log file. During startup, Passenger tells you what log file is used. This is typically&nbsp;<\/span><span style=\"font-weight: 400;\">log\/passenger.XXXX.log<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">There are also the&nbsp;application&nbsp;logs, such as&nbsp;<\/span><span style=\"font-weight: 400;\">log\/development.log<\/span><span style=\"font-weight: 400;\">&nbsp;and&nbsp;<\/span><span style=\"font-weight: 400;\">log\/production.log<\/span><span style=\"font-weight: 400;\">. These logs are completely separate from Passenger&#8217;s own logs. If you use Rails, then Passenger will also print your application logs to the terminal, but it will not print them into Passenger&#8217;s log file.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Nginx and Apache<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Nginx and Apache are web servers that enable HTTP transaction handling and serve static files. However, they are not Ruby application servers and cannot run Ruby applications directly. That is why Nginx and Apache are used in combination with an application server, such as Passenger.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Application servers make it possible for Ruby apps to speak HTTP. Ruby apps (and frameworks like Rails) can&#8217;t do that by themselves. On the other hand, application servers typically aren&#8217;t as good as Nginx and Apache at handling HTTP requests. Nginx and Apache are better at handling&nbsp;HTTP concurrency management, I\/O security, connection timeouts, etc.&nbsp; It is due to this reason that application servers are used in combination with Nginx or Apache in production environments.<\/span><\/p>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Phusion Passenger is a free web server and application server with support for Ruby, Python and Node.js. It is designed to integrate into the Apache HTTP Server or the Nginx&hellip;<\/p>\n","protected":false},"author":4,"featured_media":12890,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[3],"tags":[106],"class_list":["post-2779","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-articles","tag-server"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/2779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=2779"}],"version-history":[{"count":15,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/2779\/revisions"}],"predecessor-version":[{"id":12892,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/2779\/revisions\/12892"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/12890"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=2779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=2779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=2779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}