Welcome! Log In Create A New Profile

Advanced

nginx sends 301 redirect for alias in location

pva
September 05, 2018 03:00AM
Hi. Could you, please, explain. Why nginx sends 301 redirect for the
following vhost:

server {
listen 80;
server_name test.domain.tv http://test.m9.smotreshka.tv;

access_log off;

location = /test/README.txt {
alias /var/www/;
}
}

Here is redirect:

$ http http://test.domain.tv/test/README.txt
HTTP/1.1 301 Moved Permanently
Connection: keep-alive
Content-Length: 178
Content-Type: text/html
Date: Wed, 05 Sep 2018 06:55:27 GMT
Keep-Alive: timeout=20
Location: http://test.domain.tv/test/README.txt/
Server: nginx

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>



--
Peter.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx sends 301 redirect for alias in location

pva September 05, 2018 03:00AM

Re: nginx sends 301 redirect for alias in location

Maxim Dounin September 05, 2018 08:28AM

Re: nginx sends 301 redirect for alias in location

pva September 06, 2018 12:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready