How can I determine whether a website uses Apache or ngx?

Source: Internet
Author: User
How can I determine whether a website uses Apache or ngx? Which configuration files can be used to determine? How can I determine whether a website uses Apache or ngx? Which configuration files can be used to determine?

Reply content:

How can I determine whether a website uses Apache or ngx? Which configuration files can be used to determine?

There is a server field in the response header to judge

Your answer is simple and crude, but it is useless in some situations, such:

Lighttpd Modification
Setenv. add-response-header = ("Server" => "SSHTTPd ",
"X-Powered-By" => "SSPPP ")

What you find the header is
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

It is useless.

Therefore, I propose a solution:

XXX @ A-PC :~ $ Nmap-sV XXX. XXX. XXX

Starting Nmap 6.40 (http://nmap.org) at CST
The Nmap scan report for IP address and domain name are hidden ..
Host is up (0.0049 s latency ).
Not shown: 999 filtered ports
PORT STATE SERVICE VERSION
80/tcp open http lighttpd

This is very accurate. (The lighttpd with the header modified is also used)

Of course, if they want to modify the source code to modify the header,
Then you can proceed.

Open the browser-F12-open the URL

Installing Wappalyzer is a chrome extension. If the website performs load balancing, you will not be able to understand it.

This problem can be pushed to a more general version, that is, how to identify the server program behind any website. The answer is that there is no limit. Because the server program is doing the wait-and-wait work for the user, it cannot be distinguished. So what are some differences between the known server program types? The answer is the root features.

What are common features? Naturally, it is a non-standard line, such as a custom HTTP header and a Server return value. However, these functions can be created, because the nature of the server program is the same, and the features are changed to something that does not affect the performance.

Therefore, even for Apache and ngx, the decision-making method generally used does not exist.

How can this problem be solved? The root cause and Cause Analysis analyzes the differences between the two methods first, and proposes false settings. The design verification code is correct or overturned, A more likely option is gradually pushed down. I believe that, as long as the content is actually different, poor performance can always be found outside.

Ask who operated and maintained the website and try to ask him

Chrome f12, click network, find the web page record, and checkServer.

After I intentionally modify it, do you know?

If the configuration is not changed

$ curl -I http://segmentfault.com/q/1010000000659515HTTP/1.1 200 OKServer: ASERVER/1.2.9-3Date: Sat, 06 Sep 2014 14:02:13 GMTContent-Type: text/html; charset=UTF-8Connection: keep-aliveX-Powered-By: PHP/5.5.9-1ubuntu4.3Set-Cookie: sfsess=dyOChB.f0350a50e8f6a4f3fe211ae191c835e6.a; expires=Sun, 07-Sep-2014 14:02:12 GMT; Max-Age=86400; path=/; domain=segmentfault.comX-Powered-By-Anquanbao: MISS from dxt-bj-sj-s91

The sorting of http header fields may be different for different server versions.

HTTP Server header is the simplest method, but this header can be removed through configuration. In fact, there is no precise method to know the type of web server. However, we can use experience, that is, statistical methods.

See http://www.zhihu.com/question/21621809

If chrome is used, you can install the wappalyzer plug-in. All technologies used by the website can be displayed.

Agree with @ dashu's opinion

What should I do if nginx is distributed to apache as a proxy server?

Portal: ChromeSnifferPlus

To get the most reliable answer: ask people.

What we can see from response is disguised.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.