【发布时间】:2017-01-25 00:21:09
【问题描述】:
一旦我们将 Rails 应用程序部署到 AWS-EC2,但当我们这样做时,我们的路由就变得一团糟。 Rails 希望 www.example.com/ 成为根。我们希望 www.example.com/myapp 成为 rails 根路径。
路线
Rails.application.routes.draw do
resources :forms do
collection do
post :accept_item
end
end
resources :stores, m:'true'
match '/send_mail', to: 'stores#send_mail', via: 'post'
get 'products' => 'products#index', m:'true'
get 'stores' => 'stores#index', m:'true'
get 'transactions' => 'transactions#index', m:'true'
get 'inventories' => 'inventories#index', m:'true'
get 'about' => 'sites#about'
get 'man' => 'sites#index', m:'true'
root 'sites#index'
end
【问题讨论】:
-
您能否也为上述应用粘贴您的 apache 配置文件?
标签: ruby-on-rails apache amazon-web-services amazon-ec2