使用(独angular兽和nginx)在rails app sub uri上部署sinatra应用程序

我有Rails应用程序运行在独angular兽+ nginx上。 下面是nginx.conf和unicorn.rbconfiguration。

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 

这对我来说工作得很好。 现在我想部署另一个小的sinatra应用程序轨应用子uri(localhost:3000 / sinatraapp)。 详细信息:因为我们知道在localhost:3000上运行rails应用程序,现在我正在尝试在localhost:3000 / sinatraapp上configurationsinatra应用程序。

请build议我,我将如何configuration以上要求。