Enable Passenger on a domain


This article describes enabling Passenger on your domain within the DreamHost panel.

At DreamHost, Passenger only integrates with servers running Apache.

View the following article if you'd prefer to use Nginx without Passenger instead:

If your Ruby application doesn't start because of a missing gem, install it locally using Bundler. For more information about using Bundler, please visit the following page:

Enabling Passenger

  1. Navigate to the Manage Websites page.
  2. Click the Manage button to open the Domain Settings page, which allows you to adjust various settings for your site.
    • If in Grid view, click the Manage button at the bottom of the website box.
    • If in List view, click the Manage button at the far right of your domain name.
  3. Scroll down to the Additional Settings section and click the Modify button on the Web Options row.
  4. Enable Passenger by clicking the radio button on the right. The panel adds a /public subdirectory for you.

    If you already have a /public directory in the current Web directory, clicking OK will only switch the 'Web directory' to this new /public folder. Nothing in it is removed.

    If you do not already have a /public directory, the panel creates it for you with a coming soon page. The files in your current Web directory remain untouched.

  5. Click the Save Changes button to save your changes.
  • Whenever the code or configuration files for your application are modified, you must create or update the modification date of the file tmp/restart.txt in the application's root directory tree to trigger Passenger to reinitialize the application. Passenger caches many resources, so changes are not recognized unless the modification date of tmp/restart.txt is changed.
  • The most common method to make this change is to run the following command via SSH.
    [server]$ "touch tmp/restart.txt" . 
    (Ruby on Rails automatically creates a directory named tmp. If you create a non-RoR application, you may need to create the tmp directory manually.

The "public" subdirectory

  • Passenger maps the "public" directory to be the document root for your domain/subdomain.
  • If a static HTML file named public/index.html exists, it's then used as the response for requests for the root document (i.e., "/").
  • If you want your application to handle requests for the root document, you must first remove "public/index.html" (if it exists).
  • By default, Ruby on Rails creates a static public/index.html file.

Likewise, a file inside the public subdirectory named with one of the suffixes recognized by Apache (e.g., public/foo.cgi or public/foo.pl) will be treated as an executable CGI script in the usual Apache fashion.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?