If all SharePoint sites are returning 404 errors, including Central Admin site after a fresh installation. the problem might be the IIS setting about unlisted file extensions.
To check if this is the case:
Enable IIS logs and check the sub status of the 404 error.
If the sub status is 7 (i.e. error is 404.7), then check the IIS config file located at C:\Windows\System32\inetsrv\config\applicationHost.config
look for the segment
<fileExtensions allowUnlisted="false" > and change it to
<fileExtensions allowUnlisted="true" > this setting (false) basically only allows IIS to return the specified file extensions and will block any other files. Setting it to true may fix the 404 error.
Thank you – this fixed my problem, after installing SP 2013, Central Admin site would not come up…