T
T
Type Programmer2018-04-01 12:47:28
Web development
Type Programmer, 2018-04-01 12:47:28

How to make an HTTP request to a site without a domain?

A request for sites with a domain works, but how to access a site without a domain?
For sites with a domain, I created a file where:
GET / HTTP/1.1
Host : domain
AND via netcat (IP domain) 80 < that file, I get
the answer But with a site without a domain, the response is
400 Bad RequestBad Request
Your browser sent a request that this server could not understand.
Apache/2.4.18 (Ubuntu) Server at trojandev.com Port 80

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CODER_ua, 2018-04-01
@CODER_ua

If I correctly understood the essence of the problem, then you need to make an appropriate entry in the hosts file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question