Error 403 Access Forbidden

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Error 403 Access Forbidden

Postby bandrus » 13. September 2019 18:31

I'm trying to access a file in the htdocs directory on the localhost but every time I try to navigate to it I get the following message: Access forbidden! You don't have permission to access the requested object. It is either read protected or not readable by the server. If you think this is a server error, please contact the webmaster. Error 403. I'm aware that the suggested fix for this is to change "Require local" to "Require all granted" in the httpd-xampp conf file; which I have done under the directory tag "C:/xampp/phpMyAdmin" but I still get the error. Do I need to change every instance of "Require local" to "Require all granted"? The version of xampp I'm using is 7.3.8.
bandrus
 
Posts: 2
Joined: 13. September 2019 18:05
XAMPP version: 7.3.8
Operating System: Windows

Re: Error 403 Access Forbidden

Postby Altrea » 13. September 2019 19:13

No. You should not change any of the Require local settings. Require local means localhost is allowed.

How do you access the file?
What is the full contents of your Apache access.log?

Best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Error 403 Access Forbidden

Postby bandrus » 15. September 2019 15:40

I'm trying to access the file by typing http://localhost/C:/xampp/htdocs/Viare/index.html into the web browser, and every time access is forbidden. Here is the relevant log info:

::1 - - [11/Sep/2019:11:40:11 -0400] "GET /C:/xampp/htdocs/Viare/index HTTP/1.1" 403 1041 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
::1 - - [11/Sep/2019:11:40:12 -0400] "GET /favicon.ico HTTP/1.1" 200 30894 "http://localhost/C:/xampp/htdocs/Viare/index" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
::1 - - [11/Sep/2019:11:43:32 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1041 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
::1 - - [11/Sep/2019:12:09:16 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1041 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
::1 - - [13/Sep/2019:11:52:24 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1035
::1 - - [13/Sep/2019:11:53:37 -0400] "GET / HTTP/1.1" 302 -
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/ HTTP/1.1" 200 7576
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/images/bitnami-xampp.png HTTP/1.1" 200 22133
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/stylesheets/normalize.css HTTP/1.1" 200 6876
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/stylesheets/all.css HTTP/1.1" 200 481698
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/images/fastly-logo.png HTTP/1.1" 200 1770
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/javascripts/modernizr.js HTTP/1.1" 200 51365
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/images/xampp-logo.svg HTTP/1.1" 200 5427
::1 - - [13/Sep/2019:11:53:37 -0400] "GET /dashboard/javascripts/all.js HTTP/1.1" 200 188385
::1 - - [13/Sep/2019:11:53:38 -0400] "GET /dashboard/images/social-icons.png HTTP/1.1" 200 3361
::1 - - [13/Sep/2019:11:53:38 -0400] "GET /dashboard/images/favicon.png HTTP/1.1" 200 2508
::1 - - [13/Sep/2019:11:54:38 -0400] "GET /dashboard/howto.html HTTP/1.1" 200 6021
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/transfer-files-ftp.html HTTP/1.1" 200 9166
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image3.png HTTP/1.1" 200 8369
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image1.png HTTP/1.1" 200 27109
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image6.png HTTP/1.1" 200 12395
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image5.png HTTP/1.1" 200 14047
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image4.png HTTP/1.1" 200 8333
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image9.png HTTP/1.1" 200 42045
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image10.png HTTP/1.1" 200 43490
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image11.png HTTP/1.1" 200 14914
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image7.png HTTP/1.1" 200 15963
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image2.png HTTP/1.1" 200 3016
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/docs/images/transfer-files-ftp/image8.png HTTP/1.1" 200 14042
::1 - - [13/Sep/2019:11:55:11 -0400] "GET /dashboard/images/pdf-icon.png HTTP/1.1" 200 3778
::1 - - [13/Sep/2019:12:52:26 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1035
::1 - - [13/Sep/2019:12:55:21 -0400] "GET / HTTP/1.1" 302 -
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/ HTTP/1.1" 200 7576
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/stylesheets/normalize.css HTTP/1.1" 200 6876
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/stylesheets/all.css HTTP/1.1" 200 481698
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/images/xampp-logo.svg HTTP/1.1" 200 5427
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/javascripts/modernizr.js HTTP/1.1" 200 51365
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/images/fastly-logo.png HTTP/1.1" 200 1770
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/images/bitnami-xampp.png HTTP/1.1" 200 22133
::1 - - [13/Sep/2019:12:55:21 -0400] "GET /dashboard/javascripts/all.js HTTP/1.1" 200 188385
::1 - - [13/Sep/2019:12:55:22 -0400] "GET /dashboard/images/social-icons.png HTTP/1.1" 200 3361
::1 - - [13/Sep/2019:12:55:22 -0400] "GET /dashboard/images/favicon.png HTTP/1.1" 200 2508
::1 - - [13/Sep/2019:12:55:35 -0400] "GET /dashboard/phpinfo.php HTTP/1.1" 200 97834
::1 - - [13/Sep/2019:12:55:36 -0400] "GET /favicon.ico HTTP/1.1" 200 30894
::1 - - [13/Sep/2019:12:56:44 -0400] "GET /dashboard/faq.html HTTP/1.1" 200 31751
::1 - - [13/Sep/2019:12:56:44 -0400] "GET /dashboard/images/screenshots/xampp-windows-start.jpg HTTP/1.1" 200 491093
::1 - - [13/Sep/2019:12:59:49 -0400] "GET /index.html HTTP/1.1" 404 1053 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET / HTTP/1.1" 302 - "http://localhost/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/ HTTP/1.1" 200 7576 "http://localhost/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/stylesheets/normalize.css HTTP/1.1" 200 6876 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/stylesheets/all.css HTTP/1.1" 200 481698 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/javascripts/modernizr.js HTTP/1.1" 200 51365 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/images/xampp-logo.svg HTTP/1.1" 200 5427 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/images/fastly-logo.png HTTP/1.1" 200 1770 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/images/bitnami-xampp.png HTTP/1.1" 200 22133 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/javascripts/all.js HTTP/1.1" 200 188385 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/images/social-icons.png HTTP/1.1" 200 3361 "http://localhost/dashboard/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:12:59:58 -0400] "GET /dashboard/images/favicon.png HTTP/1.1" 200 2508 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:13:17:24 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1041 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:13:26:47 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1041 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [13/Sep/2019:13:27:30 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1041 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
::1 - - [15/Sep/2019:10:24:26 -0400] "GET /C:/xampp/htdocs/Viare/index.html HTTP/1.1" 403 1041 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
::1 - - [15/Sep/2019:10:29:26 -0400] "-" 408 - "-" "-"
bandrus
 
Posts: 2
Joined: 13. September 2019 18:05
XAMPP version: 7.3.8
Operating System: Windows

Re: Error 403 Access Forbidden

Postby Altrea » 15. September 2019 15:45

bandrus wrote:I'm trying to access the file by typing http://localhost/C:/xampp/htdocs/Viare/index.html into the web browser, and every time access is forbidden.

That is wrong. Have you ever seen a file path inkluding a drive letter in an url?

If your file path is C:/xampp/htdocs/Viare/index.html the correct url would be http://localhost/Viare/index.html
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Error 403 Access Forbidden

Postby Nobbie » 15. September 2019 15:47

bandrus wrote:I'm trying to access the file by typing http://localhost/C:/xampp/htdocs/Viare/index.html into the web browser, and every time access is forbidden.


Ouch! Thats plain nonsense....

Try http://localhost/Viare/index.html instead and urgently read about DocumentRoot etc.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 111 guests