Question

I run a Rails app on Passenger and it all works like it should.

I want to add a Sinatra app to run as a Rack application with Passenger, but I get a routing error.

My VirtualHosts File looks like:

NameVirtualHost *:80
<VirtualHost *:80>
  ServerName www.domain1.com
  DocumentRoot /home/user1/vhosts/project1/public
  ErrorLog     /home/user1/vhosts/project1/log/httpd_error_log
  CustomLog    /home/user1/vhosts/project1/log/httpd_access_log combined
</VirtualHost>

<VirtualHost *:80>
  ServerName www.sub.domain2.com
  DocumentRoot /home/user2/vhosts/sinatra_app/lib/public
  ErrorLog     /home/user2/vhosts/sinatra_app/lib/log/httpd_error_log
  CustomLog    /home/user2/vhosts/sinatra_app/lib/log/httpd_access_log combined
</VirtualHost>

My Sinatra app is really simple; I have a route called get "/do_something" do .... with no public files. it only responds with some JSON.

How can I make it do requests like www.sub.domain2.com/do_something

Was it helpful?

Solution

It seems OK,are the priviledges set correctly?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top