Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

238
Views
Same domain hosting of both static landing page and Rails app on sub-uri with Dokku

I currently have the following scenario on one of my VPSs:

  • https://example.com - Landing page hosted on root of domain
  • https://example.com/app - Nginx proxying /app to my Rails app on same VPS (served by Puma)

Need to migrate both to a new server as Dokku apps and that should result in two apps: one for the static landing page and one to the Rails app. Is that even possible? If yes, any tips?

Thanks!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Got it working by setting a reverse proxy on the landing page app's nginx config file, pointing to the main app:

  • Disable VHOST support on main app, since it won't be reachable outside or by a domain name. This will create a local listening container on a high numbered port
  • Add a proxy.conf file to /home/dokku/landing-page/nginx.conf.d/
  • Set up a reverse proxy on a 'location /app/' block inside that file. Set the upstream to the main app's IP and PORT (from the first item).

That's the main steps. Had to tweak forwarded headers a bit to get SSL working fine, but it works fine!

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!