Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1431694
Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 4 years ago.
Improve this questionI'm getting a 502 Bad Gateway error for wp-admin/admin-ajax.php -- this is a WP site, hosted on WebFaction, which is using nginx.
Where it most obviously crops up is when adding a new post or page, clicking on "Insert Media", nothing in the library shows up. Inspector console is filled with these:
POST .php 502 (Bad Gateway) load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-u…:5
send load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-u…:5
x.extend.ajax load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-u…:5
i load-scripts.php?c=1&load%5B%5D=hoverIntent,common,admin-bar,schedule,wp-ajax-response,autosave,sug…:48
(anonymous function)
Closed. This question is off-topic. It is not currently accepting answers.
Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 4 years ago.
Improve this questionI'm getting a 502 Bad Gateway error for wp-admin/admin-ajax.php -- this is a WP site, hosted on WebFaction, which is using nginx.
Where it most obviously crops up is when adding a new post or page, clicking on "Insert Media", nothing in the library shows up. Inspector console is filled with these:
POST http://lightuphope/wp-admin/admin-ajax.php 502 (Bad Gateway) load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-u…:5
send load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-u…:5
x.extend.ajax load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-u…:5
i load-scripts.php?c=1&load%5B%5D=hoverIntent,common,admin-bar,schedule,wp-ajax-response,autosave,sug…:48
(anonymous function)
Share
Improve this question
asked Feb 26, 2014 at 0:22
madlabmgmadlabmg
11 gold badge1 silver badge1 bronze badge
7
|
Show 2 more comments
2 Answers
Reset to default 4I had similar problem on wordpress site. add these lines inside http
block of /etc/nginx/nginx.conf
file.
fastcgi_temp_file_write_size 10m;
fastcgi_busy_buffers_size 512k;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
If it still not working also add this line
client_max_body_size 50M;
What Does 502 Bad Gateway Mean?#
A 502 Bad Gateway indicates that the edge server (server acting as a proxy) was not able to get a valid or any response from the origin server (also called upstream server). This can occur for a few reasons, which we’ll discuss in the section below. If one of KeyCDN’s edge servers receive a 502 Bad Gateway response from your origin server, KeyCDN will return a 500 Origin Not Reachable page. To get a better understanding on how KeyCDN handles certain error codes, check out our CDN Error Codes page.
How to Solve 502 Errors - for Web Developers#
As a web developer or owner of the website, there are a few reasons why you may be experiencing a 502 Bad Gateway error on your origin server. Therefore, you may need to try various methods to resolve the issue. Reference the list of suggestions below:
Check if your FQDN (fully qualified domain name) is resolving correctly by using our DNS test tool. Verify if your server is reachable by using a ping test or trace-route. Check your firewall logs if you are seeing unusual drops. If you’re a Cloudflare user, try disabling it as once you’ve reached a certain limit Cloudflare will return a 502 Bad Gateway error to your visitors.
How to Solve 502 Errors - for Visitors#
If you’re a website visitor and experience a 502 Bad Gateway error then there is also a few things you can try to resolve it. Although the primary issue will almost always be the responsibility of the web developer, visitors can try the following:
Perform a hard-refresh in your browser. On Macs, this is done by pressing Cmd + Shift + R. Clear your browser cache and delete cookies. Your browser may be holding on to certain files that were saved once you visited the website with a 502 error. Restart your computer/networking equipment Change your DNS servers. If you’ve never changed them in the past you likely still have the default servers assigned to you by your ISP, try using open DNS servers such as Google's Public DNS.
本文标签: nginxWordPressadminajaxphp returns 502 Bad Gateway
版权声明:本文标题:nginx - WordPress - admin-ajax.php returns 502 Bad Gateway 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745591773a2665243.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
admin-ajax.php
? – s_ha_dum Commented Feb 26, 2014 at 1:12curl http://lightuphope/wp-admin/admin-ajax.php
and see what you get. – s_ha_dum Commented Feb 26, 2014 at 19:06