Home > Articles > Details

Nginx redirect of subdomain routes not working


Question: How do I troubleshoot the #Nginx sublevel domain not getting routed? I have tried to access the application on the #Internal #Network and all is working, but when accessing it from the Outside Network the #HTTP Status Code "Error 524" is returned.


Login to See the Rest of the Answer

Answer:
Here is how you could troubleshoot the #Status #Code "Error 524" when the app can't be accessed.

  1. Check your #Nginx #Configuration File to make sure that there is nothing conflicting in the Server Block. For Example, do not name two servers with the same name, this would conflict and Nginx will route to the First Defined/Declared Server name if matches.


  2. Make sure the upstream #block is defined correctly, that is the opening and closing tags are present and the declared Servers have semicolons at the end to terminate the declaration.

  3. Make sure that you are proxying to the correct #UpStream from the Server Block.

  4. Do not pass a large HTTP Header to the Back-End, this might cause problems if the app listening for the Incoming Request cannot handle the HTTP Header Payload.

  5. [Important]: Make sure the Ports for the respective Application are open on the Server you are trying to proxy the request to.

    - Check the Firewall logs,
    - Check the Nginx Logs for clues on what is blocking the request.

If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy