Well, the problem is simple. I have the site based on apache and trying to execute cron job at this site from the same server. Let's say my site http://example.com and cronjob is /usr/bin/curl http://example.com/cron.phpIt does not work, error is curl: (7) couldn't connect to host.Why this could happen?P.S. The site is working fine and accessible from any other external machine/client.Here is an output of iptables -S-P INPUT ACCEPT-P FORWARD ACCEPT-P OUTPUT ACCEPT-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT-A INPUT -p icmp -j ACCEPT-A INPUT -i lo -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 2222 -j ACCEPT-A INPUT -j REJECT --reject-with icmp-host-prohibited-A FORWARD -j REJECT --reject-with icmp-host-prohibitedPing failed: (ping example.com) - here I've used my server domain, of course:134 packets transmitted, 0 received, 100% packet loss, time 136759ms
Can not connect to the host itself
centos;iptables;cron;apache httpd;curl