Good day,

There is a site mydomen.ru/ Redirect to local SP is required 192.168.1.10:8080/asd/asd.xhtml

I try as follows:

location / { rewrite ^(.+)$ /asd/asd.xhtml$1 last; proxy_redirect off; proxy_pass http://192.168.1.10:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } 

A cyclic redirection error is displayed.

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky ♦

1 answer 1

If I correctly understood the intention of the author of the question, then something like this:

 location / { proxy_redirect off; proxy_pass http://192.168.1.10:8080/asd/asd.xhtml; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }