<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi. Could you, please, explain. Why nginx sends 301 redirect for the following vhost:<br></div><div><br></div><div>server {<br>    listen 80;<br>    server_name <a href="http://test.m9.smotreshka.tv" target="_blank">test.domain.tv</a>;<br><br>    access_log off;<br><br>    location = /test/README.txt {<br>        alias /var/www/;<br>    }<br>}</div><div><br></div><div>Here is redirect:<br></div><div><br></div><div><div class="gmail-m_-3683183965581927289gmail_signature"><span style="font-family:monospace,monospace"> $ http <a href="http://test.domain.tv/test/README.txt">http://test.domain.tv/test/README.txt</a><br>HTTP/1.1 301 Moved Permanently<br>Connection: keep-alive<br>Content-Length: 178<br>Content-Type: text/html<br>Date: Wed, 05 Sep 2018 06:55:27 GMT<br>Keep-Alive: timeout=20<br>Location: <a href="http://test.domain.tv/test/README.txt/">http://test.domain.tv/test/README.txt/</a><br>Server: nginx<br><br><html><br><head><title>301 Moved Permanently</title></head><br><body bgcolor="white"><br><center><h1>301 Moved Permanently</h1></center><br><hr><center>nginx</center><br></body><br></html></span><br><br></div><div class="gmail-m_-3683183965581927289gmail_signature"><br></div><div class="gmail-m_-3683183965581927289gmail_signature"><br>--<br>Peter.</div></div>
</div></div></div>