HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Wget & cron jobs (http://www.howtoforge.com/forums/showthread.php?t=60598)

reason8 17th February 2013 02:22

Wget & cron jobs
 
Hello and good evening.

I am running ISPConfig 3.0.4.6.

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?

falko 17th February 2013 12:46

Does the DNS record for the domain point to the correct IP?

reason8 17th February 2013 22:15

Wget & cron jobs
 
Yes. It does.

falko 19th February 2013 19:47

Is it possible that your router does not support loopbacks?

reason8 13th March 2013 03:21

Quote:

Originally Posted by falko (Post 292295)
Is it possible that your router does not support loopbacks?

Yes, its possible. I will check into it.

Thanks!


All times are GMT +2. The time now is 08:25.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.