WordPress Migrate 502 Bad Gateway nginx I did a fresh Drupal(v7.39) installation on Nginx server. Everything seem fine until the WordPress Migration process with "Migrate", "WordPress Migrate", and "Migrate Extras" modules. The error message I got is
 An AJAX HTTP error occurred. HTTP Result Code: 502 Debugging information follows. Path: /batch?id=83&amp;op=do StatusText: Bad Gateway ResponseText: 502 Bad Gateway 502 Bad Gateway nginx.

Even I got an error, all the content did migrate correctly except the url alias. The URL was set for "Set path aliases to their original WordPress values" during the process, but they came out like node/101, node/103....

What may causing the error and how can I fix this?
A 502 Bad Gateway error can mean a lot of things, however, if you had the site working OK and then it stopped after changing things in the database, then it basically points to a problem with the way PHP is interpreting things in the database.


You'll need to look at your PHP configuration to find where the PHP error log is on the server and then look into that error log to understand what the problem is. 
There is a chance that the error is being recorded into Drupal's watchdog, usually available at admin/reports/dblog - if you can't view that inside the website you could use drush with the drush ws command to see items in watchdog, or just use SELECT * FROM watchdog ORDER BY wid DESC LIMIT 20; at a sql client to see the contents of the watchdog table.


The 502 error indicates there is a problem, but doesn't indicate the specific problem. If you post more details from your PHP error log it will be easier to help you fix it.