Wget & cron jobs

Discussion in 'Installation/Configuration' started by reason8, Feb 17, 2013.

  1. reason8

    reason8 Member

    Hello and good evening.

    I am running ISPConfig

    I hope domain.tld and am trying to run a cronjob using wget but its not working.

    The command looks like this:
    * * * * * /usr/bin/wget -O - http://domain.tld/subfolder/name_of_file

    The wget response I get is:

    --2013-02-16 17:16:00-- http://domain.tld/subfolder/name_of_file
    Resolving domain.tld... XXX.XXX.XXX.XX (PUBLIC IP ADDRESS via DDNS)

    Connecting to domain.tld|XXX.XXX.XXX.XX|:80... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2013-02-16 17:16:00 ERROR 404: Not Found.

    But if I add the FQDN to the /etc/hosts file, the command and cron works BUT the domain is not correctly resolvable from the Internet.

    What is the best way to get wget to work? I can also use curl but curl does not seem to work either. I am assuming for the same reason.

    And yes, I can access http://domain.tld/subfolder/name_of_file in my web browser while on the LAN.

    Can someone please help?
  2. falko

    falko Super Moderator ISPConfig Developer

    Does the DNS record for the domain point to the correct IP?
  3. reason8

    reason8 Member

    Yes. It does.
  4. falko

    falko Super Moderator ISPConfig Developer

    Is it possible that your router does not support loopbacks?
  5. reason8

    reason8 Member

    Yes, its possible. I will check into it.


Share This Page