chrome 工作时 wget 错误 503
wget error 503 while chrome works
我正在尝试创建一个 cron 作业来访问特定的 URL 来做一些维护工作。从 Chrome 远程访问 URL 工作正常(returns 200 OK),使用 wget 在服务器上本地访问它让我 "ERROR 503: Service Unavailable."
root@domain:/home/admin/web/domain.com/public_html/# wget http://www.domain.com/index.php?route=module/marketplace&action=run_queue
[1] 30283
root@domain:/home/admin/web/domain.com/public_html/# --2016-09-06 16:02:42-- http://www.domain.com/index.php?route=module/marketplace
Resolving www.domain.com (www.domain.com)... 46.10.20.30
Connecting to www.domain.com (www.domain.com)|46.10.20.30|:80... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
2016-09-06 16:02:42 ERROR 503: Service Unavailable.
我正在使用 Apache/2.4.7 (Ubuntu) + Nginx 来提供静态文件。
Headers 由 Chrome
发送
GET /index.php?route=module/marketplace&action=run_queue HTTP/1.1
Host: www.domain.com
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
DNT: 1
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,ro;q=0.6
Cookie: cookieconsent_dismissed=yes; __tawkuuid=e::domain.com::qsV03tUWg5avl3mTmLetAJpcbS+TGvpb7L33ER0ooHvJ0wsAPilIfGadi5f::2; Tawk_55ec3df37d21121ad0a5a=vs16.tawk.to:443::0; currency=USD; __atuvc=10%7C34; PHPSESSID=foru997tgbo437je6djtd3c2; language=ro; _ga=GA1.2.13206174.14484999; TawkConnectionTime=0; language=ro; currency=RON
Headers 在 Chrome
中收到
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 06 Sep 2016 13:22:23 GMT
Content-Type: text/html
Content-Length: 0
Connection: keep-alive
Keep-Alive: timeout=10
X-Powered-By: PHP/5.5.9-1ubuntu4.19
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
这可能是什么问题?
正是 Margaret Bloom 在我的问题下方的评论解决了我的问题。这实际上是一个身份验证问题,一旦我将网站正确配置为可公开访问,wget 便开始正常工作。
它最初在 Chrome 工作,因为我在那里进行了身份验证。
谢谢。
我正在尝试创建一个 cron 作业来访问特定的 URL 来做一些维护工作。从 Chrome 远程访问 URL 工作正常(returns 200 OK),使用 wget 在服务器上本地访问它让我 "ERROR 503: Service Unavailable."
root@domain:/home/admin/web/domain.com/public_html/# wget http://www.domain.com/index.php?route=module/marketplace&action=run_queue
[1] 30283
root@domain:/home/admin/web/domain.com/public_html/# --2016-09-06 16:02:42-- http://www.domain.com/index.php?route=module/marketplace
Resolving www.domain.com (www.domain.com)... 46.10.20.30
Connecting to www.domain.com (www.domain.com)|46.10.20.30|:80... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
2016-09-06 16:02:42 ERROR 503: Service Unavailable.
我正在使用 Apache/2.4.7 (Ubuntu) + Nginx 来提供静态文件。
Headers 由 Chrome
发送GET /index.php?route=module/marketplace&action=run_queue HTTP/1.1
Host: www.domain.com
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
DNT: 1
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,ro;q=0.6
Cookie: cookieconsent_dismissed=yes; __tawkuuid=e::domain.com::qsV03tUWg5avl3mTmLetAJpcbS+TGvpb7L33ER0ooHvJ0wsAPilIfGadi5f::2; Tawk_55ec3df37d21121ad0a5a=vs16.tawk.to:443::0; currency=USD; __atuvc=10%7C34; PHPSESSID=foru997tgbo437je6djtd3c2; language=ro; _ga=GA1.2.13206174.14484999; TawkConnectionTime=0; language=ro; currency=RON
Headers 在 Chrome
中收到HTTP/1.1 200 OK
Server: nginx
Date: Tue, 06 Sep 2016 13:22:23 GMT
Content-Type: text/html
Content-Length: 0
Connection: keep-alive
Keep-Alive: timeout=10
X-Powered-By: PHP/5.5.9-1ubuntu4.19
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
这可能是什么问题?
正是 Margaret Bloom 在我的问题下方的评论解决了我的问题。这实际上是一个身份验证问题,一旦我将网站正确配置为可公开访问,wget 便开始正常工作。
它最初在 Chrome 工作,因为我在那里进行了身份验证。
谢谢。