Welcome! Log In Create A New Profile

Advanced

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

July 10, 2013 05:15PM
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;
root /var/www/demo/public;
try_files $uri/index.html $uri @unicorn;

location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
}

error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}

unicorn.rb

working_directory "/var/www/demo"
pid "/var/www/demo/tmp/pids/unicorn.pid"
stderr_path "/var/www/demo/unicorn.log"
stdout_path "/var/www/demo/unicorn.log"

listen "/tmp/unicorn.todo.sock"
worker_processes 2
timeout 30

It's working fine for me. Now i wanted to deploy another small sinatra app rails app sub uri(localhost:3000/sinatraapp). DETAILS: As we know rails app running on localhost:3000, Now i am trying to configure sinatra app on localhost:3000/sinatraapp.

Please suggest me, How will i configure above requirement.
SubjectAuthorPosted

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

pravinmishra88July 10, 2013 05:15PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 116
Record Number of Users: 5 on November 05, 2014
Record Number of Guests: 210 on November 05, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready