Page 1 of 2

AH01630 - client denied by server configuration XAMPP

PostPosted: 31. March 2020 21:04
by abilham
Evening,

So, i have looked over a lot of threads on here about this but doesn't seem to solve it for me

I have a few web projects located in the below which has worked fine.

C:\Users\user\Desktop\XAMPP\htdocs\XXXXXX

I tried to add a virtual host but then couldn't access anything for my custom projects but the main XAMPP landing page will load at C:\Users\user\Desktop\XAMPP\htdocs

I reverted all my changes, restarted the PC and also clean install of XMAPP but no luck

Code: Select all
DocumentRoot "C:\Users\user\Desktop\XAMPP\htdocs\xxxxx"
<Directory "C:\Users\user\Desktop\XAMPP\htdocs\xxxxx">

    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . index.php

    Options Indexes FollowSymLinks Includes ExecCGI

    AllowOverride All

    Require all granted
</Directory>

Hosts file:

Code: Select all
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 11:06
by abilham
Morning All,

I have managed to get the home page to load now by changing

Code: Select all
DocumentRoot "C:/xampp/htdocs/public_html"
<Directory "C:/xampp/htdocs/public_html">


but the sub pages i just get "object not found" in browser but no errors in the error log.

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 13:27
by Altrea
Hi,

What is the contents of the Apache access.log file?

Best wishes,
Altrea

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 13:33
by abilham
HI There,

See below

Code: Select all
[Wed Apr 01 13:32:34.384168 2020] [core:warn] [pid 9128:tid 152] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Apr 01 13:32:34.420170 2020] [mpm_winnt:notice] [pid 9128:tid 152] AH00455: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.3 configured -- resuming normal operations
[Wed Apr 01 13:32:34.420170 2020] [mpm_winnt:notice] [pid 9128:tid 152] AH00456: Apache Lounge VC15 Server built: Aug 11 2019 12:20:04
[Wed Apr 01 13:32:34.420170 2020] [core:notice] [pid 9128:tid 152] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Apr 01 13:32:34.435170 2020] [mpm_winnt:notice] [pid 9128:tid 152] AH00418: Parent: Created child process 1936
[Wed Apr 01 13:32:34.959200 2020] [mpm_winnt:notice] [pid 1936:tid 320] AH00354: Child: Starting 150 worker threads.
[Wed Apr 01 13:32:36.730302 2020] [authz_core:error] [pid 1936:tid 1532] [client ::1:46689] AH01630: client denied by server configuration: C:/xampp/htdocs/
[Wed Apr 01 13:32:36.774304 2020] [authz_core:error] [pid 1936:tid 1532] [client ::1:46689] AH01630: client denied by server configuration: C:/xampp/htdocs/favicon.ico, referer: https://localhost/

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 13:35
by Altrea
That is not the access.log, that is the error.log you showed us.

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 13:44
by abilham
sorry my fault

Code: Select all
::1 - - [01/Apr/2020:13:44:08 +0100] "GET / HTTP/1.1" 403 1049
::1 - - [01/Apr/2020:13:44:08 +0100] "GET /favicon.ico HTTP/1.1" 403 1035


really appreciate your help

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 13:58
by Altrea
Okay, so you don't want to show us your "Object not found" error, because that should be written as HTTP Status 404 NOT 403 in your access.log.
But anyway.

The reason for your client denied by server configuration is, that you changed the DocumentRoot and Directory access rule to the subdirectory public_html, but only for HTTP requests.
You are trying to request by HTTPS/SSL. This is a different DocumentRoot defined in \ampp\apache\conf\extra\httpd-ssl.conf and still routes to htdocs.
But it uses the same Directory directive you changed in your httpd.conf file. So you want to request files in htdocs but don't have the access rights for this files, just for the subdirectory public_html.

Either use http requests, or change the ssl configuration too.

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 14:08
by abilham
HI Altrea,

at this stage that is all that is in my access file, its not that i have hidden any information.

but i have change it so the directory is now the root folder then browse to the Public_html file i get this...

Code: Select all
::1 - - [01/Apr/2020:13:43:37 +0100] "GET / HTTP/1.1" 403 1049
::1 - - [01/Apr/2020:13:43:37 +0100] "GET /favicon.ico HTTP/1.1" 403 1035
::1 - - [01/Apr/2020:13:43:46 +0100] "GET / HTTP/1.1" 403 1049
::1 - - [01/Apr/2020:13:43:46 +0100] "GET /favicon.ico HTTP/1.1" 403 1035
::1 - - [01/Apr/2020:13:44:06 +0100] "GET / HTTP/1.1" 403 1049
::1 - - [01/Apr/2020:13:44:06 +0100] "GET /favicon.ico HTTP/1.1" 403 1035
::1 - - [01/Apr/2020:13:44:08 +0100] "GET / HTTP/1.1" 403 1049
::1 - - [01/Apr/2020:13:44:08 +0100] "GET /favicon.ico HTTP/1.1" 403 1035
::1 - - [01/Apr/2020:14:06:48 +0100] "GET / HTTP/1.1" 200 2267
::1 - - [01/Apr/2020:14:06:48 +0100] "GET /icons/blank.gif HTTP/1.1" 200 148
::1 - - [01/Apr/2020:14:06:48 +0100] "GET /icons/folder.gif HTTP/1.1" 200 225
::1 - - [01/Apr/2020:14:06:48 +0100] "GET /favicon.ico HTTP/1.1" 404 1171
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/themes/default/css/site.css HTTP/1.1" 200 3492
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/assets/2d20bd54/css/blueimp-gallery.min.css HTTP/1.1" 200 6502
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/uploads/MTEX%20LOGO.png HTTP/1.1" 200 43988
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/uploads/social/fb.png HTTP/1.1" 200 2875
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/themes/assets/css/main.css HTTP/1.1" 200 92091
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/uploads/social/insta.png HTTP/1.1" 200 12224
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/themes/assets/css/fontawesome-all.min.css HTTP/1.1" 200 56365
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/themes/default/css/bootstrap.min.css HTTP/1.1" 200 112564
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/uploads/social/twitter.png HTTP/1.1" 200 4861
::1 - - [01/Apr/2020:14:06:52 +0100] "GET /public_html/ HTTP/1.1" 200 38585
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/themes/assets/css/uploads/banner.jpg HTTP/1.1" 200 237289
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/7b0aad6d/dosamigos-blueimp-gallery.js HTTP/1.1" 200 778
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/2d20bd54/js/blueimp-gallery.min.js HTTP/1.1" 200 32844
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/505b5e66/yii.js HTTP/1.1" 200 21444
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/52ede2db/jquery.js HTTP/1.1" 200 278292
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/8be3fa2d/js/bootstrap.js HTTP/1.1" 200 72084
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/themes/assets/webfonts/fa-solid-900.woff2 HTTP/1.1" 200 75440
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/debug/default/toolbar?tag=5e8491ecd03a9 HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/2d20bd54/img/play-pause.svg HTTP/1.1" 200 388
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/full/2446716485418526.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/full/2446716438751864.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/full/2414072478682927.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/2d20bd54/img/loading.gif HTTP/1.1" 200 3897
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/2d20bd54/img/video-play.svg HTTP/1.1" 200 279
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2446716485418526.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2414072478682927.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2446716438751864.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2400907986666043.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2414072362016272.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2405071979582977.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2400907719999403.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2380490732041102.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2368132489943593.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/17858786575583953.mp4 HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/2334469259976583.jpg HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/thumb/17879992864444969.mp4 HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/full/17879992864444969.mp4 HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /uploads/fb/full/17858786575583953.mp4 HTTP/1.1" 404 1195
::1 - - [01/Apr/2020:14:06:53 +0100] "GET /public_html/assets/2d20bd54/img/error.svg HTTP/1.1" 200 311


So i would need to change the path in both files to get it use SSL to match live envio?

i do appreciate your help

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 14:15
by Altrea
Depends.
The best way would be using a VirtualHost so you don't need to touch the default DocumentRoot and Directory. You would define your own one for your needs.

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 16:06
by abilham
Sorry but i am still struggling.

i have added to the vrtual hosts as below and home page loads (for both hosts even though the backend host is meant to load a different file) but still when i route to a subpage i get the Object not found.

Code: Select all
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "C:/xampp/htdocs/public_html"
    ServerName localhost.com
    ServerAlias www.localhost.com
    ErrorLog "logs/localhost.com-error.log"
    CustomLog "logs/localhost.com.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "C:/xampp/htdocs/public_html/backend"
    ServerName backend.localhost.com
    ServerAlias www.backend.localhost.com
    ErrorLog "logs/backend.localhost.com-error.log"
    CustomLog "logs/backend.localhost.com.com-access.log" common
</VirtualHost>


access:

Code: Select all
::1 - - [01/Apr/2020:16:03:28 +0100] "GET /site/about HTTP/1.1" 404 1171

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 16:13
by abilham
ok great got all the links working now!

but the backend virtualhost seems to just view the root folder.

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 18:06
by Nobbie
abilham wrote:ok great got all the links working now!

but the backend virtualhost seems to just view the root folder.


And what does that mean??

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 20:13
by abilham
Sorry .. Made sense in my mind!!

my virtualhost looks like this:

Code: Select all
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/public_html/backend"
    ServerName backend.localhost.com
    ServerAlias www.backend.localhost.com
</VirtualHost>


but rather than going to "C:/xampp/htdocs/public_html/backend" here it goes to "C:/xampp/htdocs/public_html" which is the main domain not the sub

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 21:12
by Nobbie
That usually means an error in the VirtualHost declaration.

Re: AH01630 - client denied by server configuration XAMPP

PostPosted: 01. April 2020 21:18
by Altrea
Did you add every domain and subdomain to your hosts file?