HTTP Error 500.1000 - Internal Server Error
07:33 12 Jan 2024

I'm trying to deploy next.js on Windows Server 2019 and facing this issue, I have installed iisnode, url-rewrite and everything needed. and Node is working fine.
enter image description here

I have tried reinstalling iisnode, restarting pc. Changing node version.

And the thing in my other server is that deploying on it is fine like when I add a website in IIS it creates IISModules folder but in this new server it's not happening. I think that's the issue, but I tried everything I could do to fix that but sadly not working.

node.js iis next.js deployment iisnode