Forbidden : You don't have permission to access this resourc

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

Forbidden : You don't have permission to access this resourc

Postby ziomario » 17. November 2019 15:48

Hello to everyone.

I'm trying to configure & run XAMPP on Windows 10. This is how I have configured it :

Step 1 : On my router I have opened ports : 80 and port 4433 on the TCP protocol (port mapping)

Step 2 : Content of httpd.conf :

Define SRVROOT "C:\xampp\Apache"

ServerRoot "${SRVROOT}"

Listen 80

ServerName 127.0.0.1:80

#<Directory />

# AllowOverride none

# Require local

#</Directory>

#DocumentRoot "C:/Users/Mario/web/default"

#<Directory "C:/Users/Mario/web/default">

#AllowOverride none

#Require all granted

#</Directory>

Include conf/vhosts/*.conf


Step 3 : Content of httpd-ssl.conf


Listen 4433

<VirtualHost _default_:4433>

# General setup for the virtual host

DocumentRoot "${SRVROOT}/htdocs"

ServerName 127.0.0.1:4433

ErrorLog "${SRVROOT}/logs/error.log"

TransferLog "${SRVROOT}/logs/access.log"


Step 4 : Created this folder : C:\Users\Mario\Web\default

Step 5 : Content of c:\xampp\apache\conf\vhosts\default :


<VirtualHost _default_:80>

DocumentRoot "C:\Users\Mario\Web\default"

<Directory "C:\Users\Mario\Web\default">

AllowOverride none

Options FollowSymLinks

Require all granted

</Directory>
</VirtualHost>


Step 6 ; when I press on the button start on the Apache module,I see that only the port 80 is opened,port 4433 is not shown. Instead on the MySQL module I see that the port 3306 is opened. Anyway,the error that I get when I open "localhost" with my browser is :

Forbidden : You don't have permission to access this resource.

Comment
ziomario
 
Posts: 2
Joined: 17. November 2019 15:46
XAMPP version: 7.3.11
Operating System: Windows 10

Re: Forbidden : You don't have permission to access this res

Postby Nobbie » 17. November 2019 19:55

ziomario wrote:#<Directory />

# AllowOverride none

# Require local

#</Directory>

#DocumentRoot "C:/Users/Mario/web/default"

#<Directory "C:/Users/Mario/web/default">

#AllowOverride none

#Require all granted

#</Directory>


Each line beginning with "#" is ignored by Apache - is it that, what you want??
Nobbie
 
Posts: 11253
Joined: 09. March 2008 13:04

Re: Forbidden : You don't have permission to access this res

Postby ziomario » 18. November 2019 10:28

yeah,because I read that if I include this command line :

Include conf/vhosts/*.conf

it takes in consideration what's written inside this file : c:\xampp\apache\conf\vhosts\default.conf,i.e. this :

c:\xampp\apache\conf\vhosts\default.conf

<VirtualHost _default_:80>
DocumentRoot "C:\Users\Mario\Web\default"
<Directory "C:\Users\Mario\Web\default">
AllowOverride none
Options FollowSymLinks
Require all granted
</Directory>
</VirtualHost>

is this right ?
ziomario
 
Posts: 2
Joined: 17. November 2019 15:46
XAMPP version: 7.3.11
Operating System: Windows 10

Re: Forbidden : You don't have permission to access this res

Postby Nobbie » 18. November 2019 12:13

Its right,

Anyway:

1) I cant see any "include" to httpd-ssl.conf, that may explain that Apache does not listen to 4433, as httpd-ssl.conf is not used in this setup?! And why dont you use 443 (the default Port for https)?

2) I have never seen that error message "Forbidden : You don't have permission to access this resource." That is NOT an original Apache message, "resource" is unknown to me, i have seen "server" and "file" instead, but never "resource". Maybe your ErrorDocuments (which Error is it? 403?) have been modified?!

3) Your DocumentRoot is stored in your private folder c:\Users\Mario, the private folders arent accessible for different users. If you are running Apache as a service (which i dont know), it is executed by SYSTEM user and therefore cannot access the DocumentRoot. You MUST NOT run Apache as a service if you like to access private folders.
Nobbie
 
Posts: 11253
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 49 guests