Does cURL output to the same site from the local network?

I am doing a PHP cURL post using the full URL (http://www.mysite.com), from one page to another on the same site. (I know this is not the best way to do this, but for my purposes this is what I need)

My question is:

Will the cURL message still go over the Internet, search by name and travel the route as if it were a post coming from another site. Or will the message remain on the local network of servers?

+3
source share
3 answers

There are several parts to querying, finding dns, and getting or posting to a site.

DNS , , dns ip, .

, :

Firewall         =>   DMZ Apache PHP Server (www.mysite.com)
222.xxx.xxx.123  =>   192.168.0.2

mysite.com 222.xxx.xxx.123, . , , .

, , ,

127.0.0.1 mysite.com

( , , )

+3

. ( , ) . , , DNS- IP-, . , ( ), .

0

. , IP- , -.

. , , (, DNS ).

You can avoid a backward pass by associating the site’s FQDN with the loopback interface on your web server / etc / hosts, which will also save your DNS query.

0
source

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


All Articles