开发者

Respond with index.html to directory request on nginx serving rails app

开发者 https://www.devze.com 2023-04-11 19:48 出处:网络
How can I make nginx or passenger respond with the index.html contained in the corresponding directory requested? For example I have a folder called media inside my public directory on my rails app, I

How can I make nginx or passenger respond with the index.html contained in the corresponding directory requested? For example I have a folder called media inside my public directory on my rails app, I want nginx to serve public/media/index.html when mysite.com/media of mysite.com/media/ is requested. I tried setting index index.html; inside my server directive in nginx conf, but it stopped serving my Rails app. I guess it's really simple I just co开发者_开发问答uldn't find the solution on my own.

0

精彩评论

暂无评论...
验证码 换一张
取 消