I've generated YARD documentation, and it lives in /gem/doc/
. I'd like to be able to serve that in my Rails app at /api/
. I'd like to avoid symlinking to it in the /public
directory, so I'm trying to configure nginx to serve these files.
Here's what I've tried so far, but it doesn't seem to be doing anything. I created a new file, config/nginx.conf
, with the following:
server {
listen 80;
location /api/ {
root gem/doc/;
index index.html;
}
}
How do I configure nginx to do this within my Rails app?