scanreg wrote:Hi Izzy
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:
.../htdocs/abc/public_html/fred/index.php
I got the 404
But, when I pulled it out of public_html, the dang thing worked okay:
.../htdocs/abc/fred/index.php
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.
HTH
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:
http://localhost/abc/public_html/fred/index.php
It would have worked also.
Your document root in the httpd.conf file is set to:
xampp/htdocs
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:
http://localhost
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.
http://httpd.apache.org/docs/2.2/
and all the directives that can be used and an explanation of each including the directory and virtual host directives can be found here:
http://httpd.apache.org/docs/2.2/mod/core.html
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.