502 means the URL is bad and Nginx cannot process the request. Seeing that this is a modal window, can you check what the URL is when you hover over the link that triggers the modal? Paste it back here...
504 means the request took too long to process. This can occur if your server is overloaded as just calling the modules admin page is not really a heavy SQL query to cause issues.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)