Short answer: no, SSL Certificates are registered against a domain (maindomain.com in your example), so unless your apps are running in separate domains you should not need multiple certificates.  

Applying the certificate to your applications will vary depending on your web server (Apache, Nginx, etc).