Domain not working

I set up openfire on top of my webserver, I use sentora panel which a fork of zpanelcp and open souce webhost cp. Openfire works great when I just use the IP but im having a problem getting the domain to work. I use cloud flare for handeling my DNS. So when i point the subdomain that I created for openfire at the computers IP it outputs webhost cp and not the openfire. I have been googling and forum crawling for the better part of the day without much luck. How would I go about making the subdomain point to the openfire server?

system info

ubuntu 12.04 LTS