How do I get passenger to serve my page on port 80 or 443?

I followed the guides (starting here: https://linode.com/docs/development/ror/ruby-on-rails-nginx-debian/) to setup my server for RoR on nginx and debian, using Passenger. However, I can only load my site on port 3000. The closest I can get to accessing my site without specifying the port is an error page from Passenger.

I'm happy to provide information on my server configuration.

For starters, here is my /etc/nginx/sites-available/[mysite] configuration.

server {
  listen 80 default_server;
  listen [::]:80;
  server_name 45.79.8.49 vault.ifrog.com;
  passenger_ruby /usr/local/rvm/gems/ruby-2.5.1/wrappers/ruby;
  passenger_enabled on;
  root /var/www/html/vault/public;
}

1 Reply

Greetings @leeatifrog,

I did some digging on my end and found documentation on the NGINX configuration. You'll also need to use Passenger Standalone. You can read about the solution below.

Deploying a Ruby App with Passenger Standalone: https://www.phusionpassenger.com/library/deploy/standalone/deploy/ruby/

Configuring Passenger Behind NGINX: https://www.phusionpassenger.com/library/deploy/standalone/reverse_proxy.html

Be sure to look at the configuration file they have. I saw that you were missing some key components.

https://www.phusionpassenger.com/library/deploy/standalone/reverse_proxy.html#step-2-install-and-configure-span-class-nginx-nginx-span-span-class-hidden-or-span-span-class-apache-apache-span

Cheers,
Preston
Linode Support Team

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct