You have to configure dynatrace application to serve JS file on proper path. go to application => edit => Advanced configuration.
By default DT is serving JS file on root path, sometimes it is prohibited on WebServer and this is why you have 404 error. If for example regular JS serving path on this app is www.example.com/resources/js/ than you should paste resources/js in proper filed in dynatrace settings. This should help.
Activation of deep monitoring was unsuccessful
Code module can not communicate with Dynatrace, likely caused by missing permissions of the process.
1) yes but path depends of your Webserver settings so can be different it was only example.
About second thing you should download support archive from this host. Expand menu on host card and pick support archive that will cover last restart of process in time. Check logs than about detailed message. What technology is behind this web server? Agent was installed with root permissions?