0
我已经为我的域example.com设置了Nginx,并启用了访问和错误日志。但是在Nginx日志目录中,有很多使用不同域名生成的日志文件,这些日志文件与我的服务器或A记录无关!Nginx - 许多不同域名的访问和错误日志
我已经删除default
文件的软链接从sites-enabled
的Nginx服务器设置:
server {
listen 80;
listen 443 ssl http2;
server_name www.example.com
server_tokens off;
ssl_certificate /path/to/certificate.pem
ssl_certificate_key /path/to/certificate.key
error_log /var/log/nginx/www.example.com.error.log;
access_log /var/log/nginx/www.example.com.access.log;
# ...
}
在日志目录/var/log/nginx
有大量的无用文件如下:
bit.ly.access.log
dlvr.it.access.log
fb.me.access.log
goo.gl.access.log
httpheader.net.access.log
ift.tt.access.log
images.apple.com.access.log
is-work.appspot.com.access.log
ow.ly.access.log
snip.ly.access.log
testp1.piwo.pila.pl.access.log
twitter.com.access.log
virtuesshop.com.access.log
www.bmwblog.com.access.log
www.ctrip.com.access.log
www.google.com.access.log
Www.Peoplematters.in.access.log
xxnet-300.appspot.com.access.log
xxnet-301.appspot.com.access.log
xxnet-302.appspot.com.access.log
xxnet-303.appspot.com.access.log
xxnet-304.appspot.com.access.log
xxnet-400.appspot.com.access.log
xxnet-401.appspot.com.access.log
xxnet-402.appspot.com.access.log
xxnet-403.appspot.com.access.log
xxnet-404.appspot.com.access.log
z.cdn.turner.com.access.log
z-h-e-n-110.appspot.com.access.log
z-h-e-n-111.appspot.com.access.log
z-h-e-n-112.appspot.com.access.log
z-h-e-n-113.appspot.com.access.log
z-h-e-n-114.appspot.com.access.log
z-h-e-n-115.appspot.com.access.log
z-h-e-n-116.appspot.com.access.log
z-h-e-n-117.appspot.com.access.log
z-h-e-n-118.appspot.com.access.log
z-h-e-n-119.appspot.com.access.log
z-h-e-n-119.appspot.com.access.log.1
...
有这么多不同的域名文件喜欢这个!
这是安全风险吗?我怎样才能解决这个问题,并在未来阻止这种类型的活动?
没有指定任何server_name? – vinaykrsharma
是的,除了'www.example.com'之外,还会发现其他任何东西。 –
任何想法为什么会发生这种情况?记录只为example.com设置,那么其他域名如何能够到达这里! – vinaykrsharma