This is what you should see in your httpd.conf file not what you did as that was very wrong.
- Code: Select all
DocumentRoot "C:/xampp/htdocs"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/xampp/htdocs">
...and look how the rest of this
<Directory "C:/xampp/htdocs"> directive is constructed by reading on from here until you see the end of the directive
</Directory>.
You will see that the DocumentRoot has it's configuration changed to allow access from all among other directives that it needs to function.
TheTitans wrote:DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
You have just changed this in error and now
Deny from all means exactly that - no access for anybody to the htdocs directory, your server's DocumentRoot - so correct this by reverting to what it should be, as pointed out above, and read the comment
# lines in the httpd.conf file as they will help you in future.
You should not change anything in the httpd.conf file until you know what you are doing or you will always have issues.
Your error message has nothing to do with the httpd.conf file at all and is the result of your not quite knowing how to configure your scripts.
The error message is telling you that the path to
/admin/top.php is not correct as
/admin is
C:\xampp\htdocs\admin and I suspect this is not the case - the server is looking for the directory admin in the htdocs directory and can't find it, according to the error message.
TheTitans wrote:with the error above, the system is thinking that the C:\ drive is the root
That is not what I see and I just explained that above.
Try changing the link in your php script to a full path "C:/xampp/htdocs/admin/top.php" if your website is in htdocs (or is it in a sub directory of htdocs like
htdocs\mysite\admin?) or simply change it to a relative path to C:\xampp\htdocs\admin\scripts\authentication.php - you will need to experiment with this for example .\admin\top.php
Paths are all important and need special attention and double checking to make sure they are indeed correct.
Don't forget to restart Apache after making changes to the httpd.conf file and always make a back up conf and ini files before editing, this way you always have a clean default starting point to try again if things go belly up.