How do I set up a Sinatra app under Apache with Passenger?

后端 未结 2 754
余生分开走
余生分开走 2020-12-22 20:17

Let\'s say I have the simplest single-file Sinatra app. The hello world on their homepage will do. I want to run it under Apache with Phusion Passenger, AKA mod_rails.

2条回答
  •  别那么骄傲
    2020-12-22 21:02

    Example vhost file for rack app with passenger:

    
     ServerName   server.local
     ServerAlias  *.server.local
     DocumentRoot /dir/public
     RackEnv      development
     
     Order allow,deny
      Allow from all
     
    
    

    Example Config.ru:

    require File.expand_path('../boot.rb', __FILE__)
    use Rack::Middleware
    run Rack::Cascade.new([array])
    

提交回复
热议问题