I'm hoping this will help someone as it took me quite a while to figure out what was going on.
A clean installation on Ubuntu 14.04 following the instructions on emoncms.org resulted in a 404 error trying to access the emoncms server.
It turns out that in apache2 version 2.4.7+ the root directory is now /var/www/html and NOT /var/www per the instructions.
All you have to do is perform the git command from the /var/www/html directory and all will be good.
Cheers !
Re: EmonCMS on Ubuntu 14.04 www folder change.
I had the same problem.
I changed references to /var/www/html to
/var/www/emoncms in
/etc/apache2/sites-available/000-default.conf.
This works, but I am not an apache expert and am not sure if it is a good thing to do.
Re: EmonCMS on Ubuntu 14.04 www folder change.
I too am not an Apache expert, but I seem to remember reading somewhere that the change was done to improve security (sandbox the web pages), so I suspect you might have opened up your machine to malware. It would be wise to check.