I know that the index.php file is there.
What I found is that it has something to do with being within the /public_html/ directory.
When I tried to run things from here:
I got the 404
But, when I pulled it out of public_html, the dang thing worked okay:
No lie, that's the only thing I changed. It runs great now. Maybe there's some apache config file that I should check. I dunno.
You can drop the public_html folder as it is the default on a Linux server.
The default that corresponds to it in the XAMPP Apache server is htdocs.
Correct paths are very important as the server has no way of knowing them unless you tell it in a configuration file or in the address bar of your browser as you found out.
In your case it had no way of knowing that you used public_html. You did not use it in your address bar. If you had run this:
It would have worked also.
Your document root in the httpd.conf file is set to:
by defaults and so looks for web sites under that directory and should remain unchanged so that you can always see the XAMPP Welcome Page with the test items and other configurations like security and password changes and phpMyAdmin etc. by typing in the address bar:
So you can get a better understanding of how Apache does things, look into the docs and, in your case, find the Configuration links and the Virtual Host links. They are fairly easy to follow and are very comprehensive in content.
and all the directives that can be used and an explanation of each including the directory and virtual host directives can be found here:
Try experimenting and a golden rule is to always back up the original conf files before editing so it is a simple matter to revert if things go wrong and the server won't start.