Added new codes to create a VirtualHost for each application

Added codes to separate each application in a virtual host container
Fixed many of the checkstyle and PMD warnings.