Cyber Ninja
asked on
What command can i use on a mac terminal to know the version of nginx running on a remote IP address
What command can i use on a mac terminal to know the version of nginx running on a remote IP address?
ASKER
@Dr. Klahn how do i request a non existent page? I don't understand your answer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The next should help, replace the www.example.com to the website in question
Bad:
Good:
curl -v http://www.example.com/whatever-non_existing/page/you/can/com/up/with/or/something/else/that/is/highly/unlikely/to.exist
Any system admin worth their salt should have server_tokens disabled. Bad:
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/x.y.z</center>
</body>
Good:
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
Freely adapted from the above page:
Nginx shows the version number in default error pages and in the headers of HTTP requests. To see this, request a non-existent page on the site or monitor an HTTP transaction to the site. This is a bad thing to be seen by anyone and it should be disabled. Set the server_tokens statement to off in the nginx global configuration file.
Open in new window
Restart nginx. Clear the browser's cache. Request a non-existent page. It should no longer display the Nginx version.
If server_tokens has been disabled, the only way to get that information is to log into the server host and check it by hand.