How to deploy .war files in Plesk Onyx 17.8 despite no longer supported TomCat?

前端 未结 3 1786
猫巷女王i
猫巷女王i 2021-01-23 01:53

Up to and including version 17.5 Plesk Onyx came with a Tomcat installation, which is no longer supported from version 17.8. Thus no .war files can be deployed and executed anym

3条回答
  •  野性不改
    2021-01-23 02:12

    1. Idea

    Use a Tomcat Docker container instead and deploy your .war file in a mapped Docker volume.

    2. Solution

    • Install the Plesk extension "Docker" from the extension catalog (Home -> Server Management -> Extensions -> search textbox).
    • Open the Docker extension (Home -> Server Management -> Docker).
    • Install the Tomcat container (search textbox -> 'run' drop down box)
    • Adapt the Tomcat container configuration
      • activate "Automatic start after system reboot"
      • deactivate "Automatic port mapping"
      • for the "Manual mapping" choose a 8080 to external 8080 port configuration
    • Add two "Volume mapping"s
      • /usr/local/tomcat/webapps/ to /usr/local/tomcat/webapps/
      • /usr/local/tomcat/logs/ to /usr/local/tomcat/logs/

    3. Explanation

    The first volume mapping provides a directory on the host system (your server) which is synchronized with the webapps directory within the Tomcat container. Copying your .war file into it will deploy it at the Tomcat container. The second volume mapping provides the Tomcat container internal log files to your host system.

提交回复
热议问题