This 404 error can occur due to an error in the codes that are set in the configuration file.
Also, file permissions can cause this error. Index files also play a major role.
So, if it is improperly set then it will also cause an error.
For a detailed information about the fix, go to https://ibmimedia.com/blog/49/fix-lighttpd-404-not-found-error