I've got a apache setup that redirect to my application running on tomcat. Loading http://domain.com works fine. However http://www.domain.com provides me with a 404 error.

What shall we be held missing?

NameVirtualHost www.domain.com:80
<VirtualHost www.domain.com:80>
    ServerName www.domain.com
    ProxyPass /svn !
    ProxyPass / ajp://127.0.0.1:8009/appname/
    ProxyPassReverse / ajp://127.0.0.1:8009/appname/
    ProxyPassReverseCookiePath /appname/
</VirtualHost>

Following a first comment I've changed by code to become:

<VirtualHost www.domain.com:80>
    ServerName www.domain.com
    ServerAlias www.domain.com domain.com
    ProxyPass /svn !
    ProxyPass / ajp://127.0.0.1:8009/appname/
    ProxyPassReverse / ajp://127.0.0.1:8009/appname/
    ProxyPassReverseCookiePath /appname/
</VirtualHost>

Within the apache logs I visit a 404 error "GET / HTTP/1.1" 200 16060" Within the browser an apache tomcat 404 error (tomcat 6..28) nothing within the tomcat logs

Use ServerAlias.

<VirtualHost www.domain.com:80>
    ServerName www.domain.com
    ServerAlias www.domain.com domain.com
    ProxyPass /svn !
    ProxyPass / ajp://127.0.0.1:8009/appname/
    ProxyPassReverse / ajp://127.0.0.1:8009/appname/
    ProxyPassReverseCookiePath /appname/
</VirtualHost>

Edit: When facing that type of problems, you are able to directly hit tomcat on its HTTP port (see server.xml) and appearance when the problem happens.