How to determine which server is listening on port 80

I need to determine which web server (IIS, Apache, Jetty) is running on port 80 in Java.

Are there any solutions for getting information through port 80?

Thanx and reguards

Stephen

+3
source share
2 answers

You can ask a question - issue a HEAD request, for example. open a TCP connection on port 80 and just send

HEAD / HTTP/1.0

or

HEAD / HTTP/1.1
Host: the.server.hostname.com

and the response should contain a server line

Server: Microsoft-IIS/5.1

by the way.

, , Java- . , netstat -ano (-anp linux, ), , 80, , , .

+6

Server: HTTP-. - :

Server: Apache/2.2.10 (SpaceNet) PHP/5.2.6

, , , .

+3

Source: https://habr.com/ru/post/1753866/


All Articles