under NAT server wget cronjob fail to a local url
Hi Guys,
I have a big problem with the cronjob, my centos64 server is under NAT, and if I schedule a "wget" command to a local url (the url is on the same server), the command fail with timeout error,
.vB
same command to an external url (but identical file) work perfectly (the url is on the other server)
.vB
I think the problem is the server IP, because is not the public IP (46.234.255.28) but is the private IP, obviously I can't add public IP because this is the gateway IP address,
.vB
any idea?
-
Hello :) Have you tried adding an entry to your /etc/hosts file pointing the domain name to a local IP address to see if that makes a difference? Thank you. 0 -
Hi Michael, yes I tried, but the only result is a resolution 127.0.0.1 instead of a public ip, but the timeout error persists. 0 -
Have you considered simply executing the file with the PHP command itself since the file is local? Thank you. 0 -
yes, and it works, /usr/local/bin/php -q /home/trilogy/public_html/helloworld.php
but I thought that the error of wget could be a problem for the normal functioning of cPanel, if not, I will continue to use this method.0 -
It should not result in any issues with cPanel, but keep in mind that a 1:1 NAT environment is only supported if it was detected during the initial cPanel installation. You can find documentation on this here: 1:1 NAT Thank you. 0 -
ok Michael, Thank you for support! 0
Please sign in to leave a comment.
Comments
6 comments