Nginx externally redirect when try_files #180
Replies: 4 comments 1 reply
-
Even if I access |
Beta Was this translation helpful? Give feedback.
-
Hi @UchihaYuki ! Can you try setting 'port_in_redirect off;' in your configuration? See https://nginx.org/en/docs/http/ngx_http_core_module.html#port_in_redirect for more details. |
Beta Was this translation helpful? Give feedback.
-
the |
Beta Was this translation helpful? Give feedback.
-
'absolute_redirect off;' |
Beta Was this translation helpful? Give feedback.
-
I use the official nginx docker image. Following is my
default.conf.template
.I have a file under
https://example.com/projects/index.html
. When I access tohttps://example.com/projects
, it redirect me tohttp://example.com:9004/projects/
.Note: My
nginx
is behindtraefik
, an another reverse proxy.Why it doesn't try
$uri/index.html
as specified in my configuration, but sent a 301 redirect with$uri/
?Beta Was this translation helpful? Give feedback.
All reactions