404 page not found when a url is hit but properly served when opened from the link on index page

前端 未结 1 395
猫巷女王i
猫巷女王i 2021-01-18 09:22

I am using nginx-lua module with redis to serve static files of ember-app. The index file content is stored in redi

1条回答
  •  悲&欢浪女
    2021-01-18 10:21

    Following nginx location block has to be added in order to serve the subroutes from index file being served from redis. A detailed explanation and full nginx config can be found here.

      # This block handles the subrequest. If any subroutes are requested than this rewrite the url to root and tries to render the subroute page by passing the subroute to index file (which is served by the redis).
      location ~* / {
      rewrite ^ / last;
      }
    

    0 讨论(0)
提交回复
热议问题