部署葡萄API使用Nginx/乘客 - Deploy Grape API with Nginx/Passenger

- 此内容更新于:2016-02-02
主题:

我有我的服务器上安装Nginx和乘客。试图运行一个葡萄(架)API。当这个服务器我部署Rails应用程序块Nginx相依,说明旅客的教程,服务器的根必须指向应用程序的公共子目录。这根本是我葡萄API的?

原文:

I have Nginx and Passenger installed on my server. Trying to run a Grape (Rack) API off it.

When I deploy Rails applications I have this server block in Nginx conf;

server {
    listen 80;
    server_name yourserver.com;

    # Tell Nginx and Passenger where your app's 'public' directory is
    root /path-to-app/public;

    # Turn on Passenger
    passenger_enabled on;
    passenger_ruby /path-to-ruby;
}

The instructions on Passenger's tutorial are;

The server block's root must point to your application's public subdirectory.

What would this root be in case of my Grape API?