1

I've set up redirection on NGINX with the help of this answer and now I want to set up it with hiding redirection from user, i.e. keeping original example.com.

Things I've tried:

rewrite

server{
    server_name .example.com;
    rewrite ^/$ www.lokki.newdomain.com/resources/index.html permanent;
}

proxy_pass:

server{
    server_name .example.com;
    location / {
        proxy_pass www.lokki.newdomain.com/resources/index.html;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
      }
}

but none of them worked.

Any suggestions what I am doing wrong?

Your Answer

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

Browse other questions tagged or ask your own question.