Hello,
I understand that you are facing some challenges with setting up CWP (CentOS Web Panel) independently on a virtual machine (VM) while also using Nginx Proxy Manager (NPM) for handling incoming DNS requests. You mentioned that if you redirect external requests to the IP of the CWP VM using NPM, you are unable to resolve requests within CWP for services like mail and FTP because Nginx within CWP isn't handling the proxies.
To ensure that DNS requests can be handled by CWP, one approach could be to configure NPM to proxy the specific services (mail, FTP, etc.) within CWP instead of redirecting all requests to the CWP VM. This way, NPM can still handle the incoming DNS requests, and the necessary services within CWP can function properly.
Consider adjusting the NPM configuration to selectively proxy requests for the services you need within CWP, while allowing other requests to reach CWP directly. This should help you achieve the desired setup with CWP handling DNS requests effectively.