如何判断一个网站用的Apache还是ngx?通过哪些配置文件可以判断?
你们答案简单粗暴,但是遇到某些情况是没什么用的,例如:
lighttpd修改
setenv.add-response-header = ( "Server" => "SSHTTPd",
"X-Powered-By" => "SSPPP")
你们找到header的也不过是
Accept-Ranges:bytes
Content-Length:325
Content-Type:image/gif
Date:Wed, 03 Sep 2014 04:03:17 GMT
ETag:"692905520"
Last-Modified:Mon, 28 Oct 2013 05:17:31 GMT
Server:SSHTTPd
X-Powered-By:SSPPP
完全没什么用。
所以,我说一种方案:
XXX@A-PC:~$ nmap -sV XXX.XXX.XXX
Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-06 05:59 CST
Nmap scan report for IP和域名隐藏了。。
Host is up (0.0049s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE VERSION
80/tcp open http lighttpd
这个就很准确了。(用的也是修改过header的lighttpd)
当然如果他们铁下心要去修改源码来修改header,
那你们就从了吧。
如果配置没改的话
$ curl -I http://segmentfault.com/q/1010000000659515
HTTP/1.1 200 OK
Server: ASERVER/1.2.9-3
Date: Sat, 06 Sep 2014 14:02:13 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/5.5.9-1ubuntu4.3
Set-Cookie: sfsess=dyOChB.f0350a50e8f6a4f3fe211ae191c835e6.a; expires=Sun, 07-Se
p-2014 14:02:12 GMT; Max-Age=86400; path=/; domain=segmentfault.com
X-Powered-By-Anquanbao: MISS from dxt-bj-sj-s91