Hi
Answer#1: You have to put logs to find where Kamailio is sending 404. Check xlog lines in the code append more to see.
Answer#2: In Default Kamailio config log-facility used is 0 which mean logs will be appended to /var/log/messages or syslog. If it is something else make sure you have rsyslog configured and the corresponding custom log file present.Ofcource you have to restart both services.
Further more if Kamailio is sending 404 then simply search "404" in kamailio.cfg where it is occurring and you will know which condition and why.