0

I've installd rocketchat on ubunru with nginx and like to redirect

https://chat.myserver.tdl/privacy-policy to /a/folder/outside/webroot/index.html

which redirection rule to apply in this usecase?

  • Is there just one file in /a/folder/outside/webroot or are there css/js files for index.html too? – Richard Smith Dec 29 '18 at 19:38
1

I suppose, you need to serve that index.html when you visit /privacy-policy? If so, use the alias directive:

location = /privacy-policy {
    alias /a/folder/outside/webroot/index.html;
}

By the way, if you really need a redirect:

location = /privacy-policy {
    return 301 /a/folder/outside/webroot/index.html;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.