Piwik/PHP ignores /etc/hosts

Hi,

I am experiencing a problem using Piwik on a server, that is hosted behind a varnish server. The problem is that when we run the archive.php with the URL, it tries to go through the varnish server, even though we have the URL in the ‘/etc/hosts’. I believe this is because PHP Curl ignores the hosts file.

Using the local IP-address as URL does not resolve the issue.

ERROR: Got invalid response from API request: http://DOMAIN/index.php?module=API&method=VisitsSummary.getVisits&idSite=52&period=day&date=last52&format=php&token_auth=**&trigger=archivephp. Response was ’<?xml version="1.0" encoding="utf-8"?> 503 Service Unavailable

Error 503 Service Unavailable

Service Unavailable

Any thoughts and or sugestions?

If you set the --url= to the correct IP / host, does it not work? can you show the output that iti s using a different host?