403 error when configuring a new vhost

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

403 error when configuring a new vhost

Postby JustJim2 » 23. November 2014 02:15

I just installed xampp 5.6.3. I am trying to define a new vhost and am getting a 403 error.

This is an out of the box installation. I just installed to, went to localhost to check that the installation was running and started to make my changes in the vhost file.

Any help would be greatly appreciated.

Thanks.

----------------------- Supporting Information ------------------------------

XAMPP version:

xampp-win32-5.6.3-0-VC11-installer.exe

Operating system version:

Windows 7 Home Premium SP1 64 bit

XAMPP installation path:

C:\xampp

Configuration changes made since installation:
Went to http://localhost
Landed on http://localhost/xampp/splash.php
Clicked the "English" link
Landed on http://localhost/xampp/index.php
changed C:\xampp\apache\conf\extra\httpd-vhosts.conf (see below for file contents)


Issue report

Actions:
went to http://learn.local/

Expected reaction
I was looking to see the following:
--------------------------------------
Stub Index Page
--------------------------------------
Received reaction:
Instead I got:
--------------------------------------
Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.
Error 403
learn.local
Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3
--------------------------------------

C:\xampp\apache\conf\extra\httpd-vhosts.conf:
content
### JPO ###
<VirtualHost *:80>
DocumentRoot "C:/xampp/apache/vhosts/learn/htdocs"
ServerName learn.local
<Directory "C:/xampp/apache/vhosts/learn/htdocs">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
### JPO ###
Location Verification
C:\Users>dir C:\xampp\apache\conf\extra\httpd-vhosts.conf
Volume in drive C is OS
Volume Serial Number is ECC1-F0F6

Directory of C:\xampp\apache\conf\extra

11/22/2014 07:18 PM 1,836 httpd-vhosts.conf
1 File(s) 1,836 bytes
0 Dir(s) 791,610,281,984 bytes free

C:/xampp/apache/vhosts/learn/htdocs/
Location Verification
C:\Users>dir C:\xampp\apache\vhosts\learn\htdocs\index.html
Volume in drive C is OS
Volume Serial Number is ECC1-F0F6

Directory of C:\xampp\apache\vhosts\learn\htdocs

11/22/2014 12:04 PM 115 index.html
1 File(s) 115 bytes
0 Dir(s) 791,609,925,632 bytes free
Log file contents

C:\Windows\System32\drivers\etc\hosts:
Content
127.0.0.1 localhost
127.0.0.1 learn.local
Location Verification
C:\Users>dir C:\Windows\System32\drivers\etc\hosts.*
Volume in drive C is OS
Volume Serial Number is ECC1-F0F6

Directory of C:\Windows\System32\drivers\etc

11/22/2014 01:06 PM 880 hosts
1 File(s) 880 bytes
0 Dir(s) 791,611,011,072 bytes free

Apache Access Log:
192.168.1.64 - - [22/Nov/2014:19:03:52 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:08:54 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:13:55 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
127.0.0.1 - - [22/Nov/2014:19:16:12 -0500] "GET / HTTP/1.1" 403 1057 "http://learn.local/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
127.0.0.1 - - [22/Nov/2014:19:16:30 -0500] "GET / HTTP/1.1" 403 1057 "http://learn.local/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
127.0.0.1 - - [22/Nov/2014:19:16:32 -0500] "GET / HTTP/1.1" 403 1057 "http://learn.local/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
192.168.1.64 - - [22/Nov/2014:19:18:56 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
127.0.0.1 - - [22/Nov/2014:19:19:22 -0500] "GET / HTTP/1.1" 403 1057 "http://learn.local/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
192.168.1.64 - - [22/Nov/2014:19:23:56 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:28:58 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:33:59 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:39:00 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:44:01 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:49:03 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
192.168.1.64 - - [22/Nov/2014:19:54:04 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"
127.0.0.1 - - [22/Nov/2014:19:54:46 -0500] "GET / HTTP/1.1" 403 1057 "http://learn.local/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
192.168.1.64 - - [22/Nov/2014:19:59:06 -0500] "GET /currentsetting.htm HTTP/1.1" 403 1044 "-" "-"

Apache Error Log
[Sat Nov 22 19:03:52.901261 2014] [authz_core:error] [pid 5096:tid 1680] [client 192.168.1.64:55277] AH01630: client denied by server configuration: C:/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:08:54.167492 2014] [authz_core:error] [pid 5096:tid 1680] [client 192.168.1.64:55365] AH01630: client denied by server configuration: C:/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:13:55.407722 2014] [authz_core:error] [pid 5096:tid 1680] [client 192.168.1.64:55421] AH01630: client denied by server configuration: C:/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:16:12.366556 2014] [authz_core:error] [pid 5096:tid 1680] [client 127.0.0.1:55436] AH01630: client denied by server configuration: C:/vhosts/learn/htdocs/, referer: http://learn.local/
[Sat Nov 22 19:16:20.452018 2014] [ssl:warn] [pid 8784:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
AH00112: Warning: DocumentRoot [C:/xampp/apache/learn/htdocs/] does not exist
[Sat Nov 22 19:16:20.571025 2014] [core:warn] [pid 8784:tid 248] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Nov 22 19:16:20.789038 2014] [ssl:warn] [pid 8784:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:16:20.819039 2014] [mpm_winnt:notice] [pid 8784:tid 248] AH00455: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 configured -- resuming normal operations
[Sat Nov 22 19:16:20.819039 2014] [mpm_winnt:notice] [pid 8784:tid 248] AH00456: Apache Lounge VC11 Server built: Jul 17 2014 11:50:08
[Sat Nov 22 19:16:20.819039 2014] [core:notice] [pid 8784:tid 248] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Nov 22 19:16:20.821040 2014] [mpm_winnt:notice] [pid 8784:tid 248] AH00418: Parent: Created child process 8636
AH00112: Warning: DocumentRoot [C:/xampp/apache/learn/htdocs/] does not exist
[Sat Nov 22 19:16:21.454076 2014] [ssl:warn] [pid 8636:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
AH00112: Warning: DocumentRoot [C:/xampp/apache/learn/htdocs/] does not exist
[Sat Nov 22 19:16:21.757093 2014] [ssl:warn] [pid 8636:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:16:21.787095 2014] [mpm_winnt:notice] [pid 8636:tid 260] AH00354: Child: Starting 150 worker threads.
[Sat Nov 22 19:16:30.126572 2014] [authz_core:error] [pid 8636:tid 1680] [client 127.0.0.1:55443] AH01630: client denied by server configuration: C:/xampp/apache/learn, referer: http://learn.local/
[Sat Nov 22 19:16:32.855728 2014] [authz_core:error] [pid 8636:tid 1680] [client 127.0.0.1:55443] AH01630: client denied by server configuration: C:/xampp/apache/learn, referer: http://learn.local/
[Sat Nov 22 19:18:56.648952 2014] [authz_core:error] [pid 8636:tid 1680] [client 192.168.1.64:55449] AH01630: client denied by server configuration: C:/xampp/apache/learn
[Sat Nov 22 19:19:01.237215 2014] [ssl:warn] [pid 2308:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:19:01.319220 2014] [core:warn] [pid 2308:tid 248] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Nov 22 19:19:01.536232 2014] [ssl:warn] [pid 2308:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:19:01.567234 2014] [mpm_winnt:notice] [pid 2308:tid 248] AH00455: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 configured -- resuming normal operations
[Sat Nov 22 19:19:01.567234 2014] [mpm_winnt:notice] [pid 2308:tid 248] AH00456: Apache Lounge VC11 Server built: Jul 17 2014 11:50:08
[Sat Nov 22 19:19:01.567234 2014] [core:notice] [pid 2308:tid 248] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Nov 22 19:19:01.569234 2014] [mpm_winnt:notice] [pid 2308:tid 248] AH00418: Parent: Created child process 9352
[Sat Nov 22 19:19:02.175268 2014] [ssl:warn] [pid 9352:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:19:02.461285 2014] [ssl:warn] [pid 9352:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:19:02.493287 2014] [mpm_winnt:notice] [pid 9352:tid 260] AH00354: Child: Starting 150 worker threads.
[Sat Nov 22 19:19:22.501431 2014] [authz_core:error] [pid 9352:tid 1680] [client 127.0.0.1:55452] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/, referer: http://learn.local/
[Sat Nov 22 19:23:56.968130 2014] [authz_core:error] [pid 9352:tid 1680] [client 192.168.1.64:55505] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:28:58.209360 2014] [authz_core:error] [pid 9352:tid 1680] [client 192.168.1.64:55565] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:33:59.462590 2014] [authz_core:error] [pid 9352:tid 1680] [client 192.168.1.64:55599] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:39:00.701820 2014] [authz_core:error] [pid 9352:tid 1680] [client 192.168.1.64:55645] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:44:01.951051 2014] [authz_core:error] [pid 9352:tid 1680] [client 192.168.1.64:55707] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:49:03.190281 2014] [authz_core:error] [pid 9352:tid 1680] [client 192.168.1.64:55820] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:54:03.722470 2014] [ssl:warn] [pid 5840:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:54:03.811475 2014] [core:warn] [pid 5840:tid 248] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Nov 22 19:54:04.028488 2014] [ssl:warn] [pid 5840:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:54:04.057489 2014] [mpm_winnt:notice] [pid 5840:tid 248] AH00455: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 configured -- resuming normal operations
[Sat Nov 22 19:54:04.057489 2014] [mpm_winnt:notice] [pid 5840:tid 248] AH00456: Apache Lounge VC11 Server built: Jul 17 2014 11:50:08
[Sat Nov 22 19:54:04.057489 2014] [core:notice] [pid 5840:tid 248] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Nov 22 19:54:04.059489 2014] [mpm_winnt:notice] [pid 5840:tid 248] AH00418: Parent: Created child process 4908
[Sat Nov 22 19:54:04.631522 2014] [ssl:warn] [pid 4908:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:54:04.902538 2014] [ssl:warn] [pid 4908:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 22 19:54:04.932539 2014] [mpm_winnt:notice] [pid 4908:tid 260] AH00354: Child: Starting 150 worker threads.
[Sat Nov 22 19:54:04.940540 2014] [authz_core:error] [pid 4908:tid 1680] [client 192.168.1.64:55875] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
[Sat Nov 22 19:54:46.509917 2014] [authz_core:error] [pid 4908:tid 1680] [client 127.0.0.1:55882] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/, referer: http://learn.local/
[Sat Nov 22 19:59:06.205771 2014] [authz_core:error] [pid 4908:tid 1680] [client 192.168.1.64:55931] AH01630: client denied by server configuration: C:/xampp/apache/vhosts/learn/htdocs/currentsetting.htm
JustJim2
 
Posts: 3
Joined: 22. November 2014 19:18
Operating System: Windows 7

Re: 403 error when configuring a new vhost

Postby JJ_Tagy » 23. November 2014 02:39

I wouldn't put your vhost document folders in apache... Try something like xampp\vhost1 and xampp\vhost2.
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: 403 error when configuring a new vhost

Postby JustJim2 » 23. November 2014 03:17

Ok - moved vhosts directory up into the xampp directory. Still getting the 403 error
JustJim2
 
Posts: 3
Joined: 22. November 2014 19:18
Operating System: Windows 7

Re: 403 error when configuring a new vhost

Postby JJ_Tagy » 23. November 2014 03:31

And your order/deny stuff is for apache 2.2 instead of the 2.4 require version.

EDIT: See one of my other posts on this: viewtopic.php?f=16&t=69454&p=238058
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: 403 error when configuring a new vhost

Postby JustJim2 » 23. November 2014 04:13

changed:

<Directory "C:/xampp/vhosts/learn/htdocs">
Order allow,deny
Allow from all
</Directory>

to

<Directory "C:/xampp/vhosts/learn/htdocs">
Require all granted
AllowOverride All
Options Indexes FollowSymLinks
</Directory>

Restarted apache

And that took care of it.

SUCCESS! wOOt!

Thank you, vielen danke, gracias, arigato, spaciba.
JustJim2
 
Posts: 3
Joined: 22. November 2014 19:18
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 39 guests