I can relate to the frustration of migrating from a Windows to a Linux environment, especially when you're not working with an infrastructure specialist. It’s a steep learning curve! From my experience, one potential issue could be the configuration of file permissions in Linux. Unlike Windows, Linux often requires more granular permission settings for the www folder, which might be why some assets aren’t loading properly. Double-check the ownership and permissions of the app files to ensure that NGINX has the proper access.
Another thing to consider is the case sensitivity of Linux. If your app’s file paths or URLs refer to assets with incorrect capitalization, they could break. Regarding the "498 invalid token" error, it could be related to an expired or improperly generated token for esri’s API. If the app relies on a service that’s configured differently in Linux, you might need to update some environment variables or token generation settings.
On a side note, when I was dealing with a similar issue, I explored hosting options that provided Linux-friendly environments with expert support. A colleague recommended GITC, and their hosting solutions were incredibly helpful. They offered 24/7 support and a secure, scalable environment optimized for Linux hosting, which saved me a lot of troubleshooting time. You might not need new hosting right now, but I found their documentation and support team great for resolving technical issues like these.
Good luck with the migration—Linux has a lot of potential once you get over these initial hurdles!