On the linux server, debian is plesk 12. Through the plesk panel, two sites were created with different domains and directories:

/site1.com/httpdocs/

/site1.com/site.com/

I wanted to run cron, then I discovered that the ip addresses for the wget request between the two domains are different. Checked through the ping command via ssh and the addresses are really different. At the first domain (site1.com) everything works and shows the internal ip address of the server, at the second (site.com) it shows the external ip address and as a result it shows the 404 error not found when requesting wget http://site.com/

  • domain name resolution in ip does DNS. This does not apply to your server settings. Where are the zone files for your domains. you have a dns server on your server and you are picked up by NS records from a domain name registrar. Or all the settings of the zone at your registrar - then you need to change the settings through the recorder interface - Mike
  • All dns settings on my server, did everything via plesk. The dns settings for the two domains are identical. - Darklez
  • And the registrar of the domain NS records exactly point to your server? And where are you located secondary DNS. for one domain, both primary and secondary DNS should not be on the same machine. - Mike
  • As I understood the primary through plesk, the secondary through robot.your-server.de at the hoster is hetzner. How can I check this? - Darklez
  • run nslookup. specify set Q=NS , write the domain name. see NS. give set Q=A in turn switch servers from which to ask server ip and again enter the domain name and see what specific DNS servers are responding to. Also, if it happens on the same machine where there is a dns-server - see /etc/resolv.conf there the addresses of the DNS servers that your own machine uses are used to determine any names. - Mike

1 answer 1

The issue is resolved thanks to the advice of @Mike. In order to make sure that ping via ssh gives the correct ip , you need to go to the /etc/hosts folder and set the desired ip address to the domain and the user.

  • Or maybe just remove the mention of the hosts, then everything on the DNS will work - Mike
  • I don’t know what exactly is being done, but every user of the site / etc / hosts cannot be edited because - andreymal