Questions tagged [sinatra]

27 questions
7
votes
2 answers

Start Sinatra app in the background with stdout and stderr redirected (append) to a file

I have a Sinatra app which I run on my local machine using ruby app.rb. While deploying it on a remote machine via ssh, how do I run it in background and redirect stdout and stderr to a log file? On a restart, I want to preserve the previous logs so…
letronje
  • 429
  • 1
  • 6
  • 16
5
votes
1 answer

Apache+Passenger not serving the root of the Sinatra application

Since the last Fusion Passenger update, all my Sinatra applications have stopped working on the following env: Apache (2.4.17), Phusion Passenger (5.0.21). Everything was working as expected before updating the passenger middleware. The problem is,…
Kami
  • 1,414
  • 12
  • 25
4
votes
5 answers

Redirect to www subdomain via DNS

Is it possible to set a DNS record to redirect all example.com/* traffic to www.example.com/*? I'm running a Sinatra app on Heroku's Cedar stack. I set up Heroku's Custom Domains addon, and the documentation discusses Redirecting Traffic to a…
ma11hew28
  • 779
  • 2
  • 9
  • 17
3
votes
1 answer

Installing resque on amazon ec2 instances

My problem is to process images through ec2 instances. Based this similar question: Separate server for Resque workers And in this article: http://highscalability.com/blog/2009/11/6/product-resque-githubs-distrubuted-job-queue.html I'm planning to…
Luccas
  • 101
  • 5
2
votes
1 answer

nginx connection refused while connecting to upstream

I have a server on which I've deployed an API (Sinatra). I run that API on port 9292 and proxy requests to it. I also need to deploy a static javascript file and its supporting resources. I do that on the same server. All of the information below…
AKWF
  • 481
  • 2
  • 6
  • 17
2
votes
1 answer

NginX dropping session data when acting as an SSL reverse proxy for a sinatra application

I'm pretty much stuck at this point. I've got a website, served up on Mizuno (A Jetty variant, I think) using Padrino (A sinatra variant), on port 8080, with Nginx listening at 80/443 to allow for SSL proxying to it. The site has a login wall, where…
rp.kelly
  • 21
  • 3
2
votes
0 answers

Deploying sinatra app on rails app sub uri using( unicorn and nginx)

I have rails app running on unicorn+nginx. below is the nginx.conf and unicorn.rb configuration. nginx.conf upstream unicorn { server unix:/tmp/unicorn.todo.sock fail_timeout=0; } server{ listen 80 default deferred; #server_name localhost; …
2
votes
2 answers

Running sinatra program [Kibana] behind nginx reverse proxy in web directory

I'm trying to get Kibana to run behind nginx within a specific web directory. Or, put another way, I'm trying to have nginx reverse proxy http://example.com/kibana to http://localhost:5601/, which is where the Kibana sinatra app is running. I've…
growse
  • 7,830
  • 11
  • 72
  • 114
2
votes
1 answer

Unicorn and copy_on_write_friendly?

While researching Unicorn configuration options I came across this snippet.. GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true If I undertand correctly, it optimizes how Unicorn handles memory allocation and resource…
Miko
  • 1,709
  • 4
  • 22
  • 28
2
votes
1 answer

Trouble with nginx config and upstream servers

I'm trying to configure two applications to be served up by nginx. The first seems to be working fine and I duplicated the config for the second, however I'm having some problems. I'm running a Sinatra server backed with Unicorn using sockets to…
Samuel
  • 177
  • 2
  • 6
2
votes
2 answers

Where I can find the log files of thin webserver

I'm using thin web server for my sinatra application. Some times it generate 504 gateway time out. Where I can see the access and error logs of thin?
Sayuj
  • 121
  • 1
  • 2
2
votes
3 answers

How can I fix Sinatra redirects switching from https to http under nginx?

I have a Sinatra app running in nginx (using thin as a back-proxy) and I'm using redirect '/' statements in Sinatra. However, when I access the site under https, those redirects send me to http://localhost/ rather than to…
Alex Mullans
  • 135
  • 1
  • 6
1
vote
1 answer

Sinatra/Nginx/ELBv2 API is generating ERR_SPDY_PROTOCOL_ERROR on Chrome 58 or higher only

I have an API with the following stack: Sinatra <=HTTPS/TLS=> Nginx <=HTTPS/TLS=> ALB(ELBv2) It's a basic URL shortener that sends a 301 redirect to the browser to go to the longer URL. This was working flawlessly for a year or two, but since…
Dan R
  • 255
  • 1
  • 3
  • 13
1
vote
1 answer

Apache2 + SSL + Proxy to Sinatra App: Will it work? Or will there be some warning to the user?

I have a situation where the main website is a legacy app written in ColdFusion which I've recently migrated from MX 6.1 to 9.0.1. Another part of the website is a blog/forum in PHP5 on WordPress. Now, I'm adding a paid membership feature and…
1
vote
1 answer

How do I decide if I need to introduce HAProxy into my nginx-unicorn stack for my web application?

I'm building a service-based web application. It consists of one primary rails app purely meant to handle requests, and a lot of other sinatra services running to actually process these requests. I've decided to go with unicorn for the actual…
1
2