Switch from apache to nginx

Hello,

Currently all websites run with apache2, is it possible to switch to Nginx without having to set up the entire server again? I have several problems with the CORE headers and problems that website content is not displayed correctly. JavaScript and the like.