I was not able to get the log apache logs, but i remembered that when I was entering the web page before it was by using mydomain.com/emoncms.

For some reason if I use mydomain.com/emoncms link the web page is working, but if i use emoncms.mydomain.com it does not work and I am getting the strange layout that is shown in the first post.

So my solution for now is to use mydomain.com/emoncms.