Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am trying to get a Ruby with Roda website up and running using Flash with Nginx. However, each time I try to set it up I keep getting Bad Gateway or Forbidden errors to appear on the screen. I am keeping bundler and gem files away from the /var/www path since google suggests that I put them in a different folder. So, I keep it in the user folder instead.
I know I am pretty close to getting it to work, but I don’t know what I am missing. Any advice would be greatly appreciated.
Current Error:
# 403 Forbidden
---
nginx/1.24.0 (Ubuntu)
Gemfile code:
source 'https://rubygems.org'
gem 'roda'
gem 'falcon'
App code:
# app.rb
require "roda"
class App < Roda
route do |r|
# Root route (/)
r.root do
"Hello from Roda running asynchronously on Falcon!"
end
end
end
Config code:
# config.ru
require 'bundler/setup'
require_relative "app"
# Freezing the app structure optimizes memory and thread safety in production
run App.freeze.app
Falcon code:
#!/usr/bin/env falcon-host
require 'falcon/environment/rack'
# Bind to a local port or socket
host "duelingpets-Dev" do
# Bind locally to port 3000 (Nginx will proxy to this)
bind "http://127.0.0.1:3000"
include Falcon::Environment::Rack
end
Ngnx code:
server {
listen 80;
server_name bat.duelingpets.net;
# Optional: Serve static files directly via Nginx
root /var/www/duelingpets-Dev;
location / {
try_files $uri $uri/ @falcon;
}
location @falcon {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Falcon Roda Service
[Unit]
Description=Falcon Server for Roda App
After=network.target
[Service]
Type=simple
User=[deploy]
WorkingDirectory=/var/www/duelingpets-Dev
ExecStart=/home/[deploy]/duelingpets-gems/.bundle exec falcon serve
Restart=always
Environment=RACK_ENV=production
[Install]
WantedBy=multi-user.target
9ee5b5ed90ff4f7b9e69d1681de3b4
Sylvan Winds
Hellen Charless
a4ccdb7137084732b70d98f0c0b661
a4ccdb7137084732b70d98f0c0b661
1e6b823ea20d4cb189a34a922f5588
wcd
yolanda smith
Magdiel Sanchez
e8a1c50570b74f079e6d62d8f6b3ab
Faisol Bello
a96586b9b23547c29c6be618017cd9