I'm seeing what looks like scanning traffic in nginx access.log (perhaps looking for an open relay?)
HEAD http://www.sina.com.cn HTTP/1.1" -/- 301 0
GET http://www.qunar.com/ HTTP/1.1" -/- 301 178
GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1" -/- 301 178
I'm not sure why nginx is returning a 301 response code. Is there anything to be worried about here?
I am using a very simple location match (adding some more config details as requested)
server {
listen 443
server_name my.hostname
**some ssl settings***
**some proxy settings**
location / {
proxy_pass https://backend_host
proxy_set_header Host $server_name
**set some headders***
**error handling lines**
}
}
I found this note in the nginx documentation:
"If a location is defined by a prefix string that ends with the slash character, and requests are processed by one of proxy_pass ... In response to a request with URI equal to this string, but without the trailing slash, a permanent redirect with the code 301 will be returned..."
If I use a better location match (not ending in a slash) would that help? Is it worth bothering?
location /my/base_url {
[ configuration A ]
}
0 Answers