2

I have nginx listening on port 80 in a docker container which maps the port to 8080.

When I go to http://example.com:8080/test nginx redirects me to http://example.com/test/ while I would expect it to be http://example.com:8080/test/.

Nginx configuration:

server {
  listen 80;
  location /test {
    try_files $uri $uri/ /test.html;
  }
}

How do I make nginx use the request origin to make the redirect?

1 Answer 1

1

Using absolute_redirect off; solved the problem.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.