我跑客运一个Rails应用程序,它所有的作品像它应该。

我想添加一个西纳特拉应用与乘客机架应用程序运行,但我得到一个路由错误。

我VirtualHosts文件如下:

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>

我西纳特拉应用程序是非常简单的;我有一个名为get "/do_something" do ....没有公开的文件路径。只响应一些JSON。

如何可以把它做像www.sub.domain2.com/do_something请求

有帮助吗?

解决方案

看来行,在本权限的设置是否正确?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top