Author |
|
Express
Joined: 07 Jan 2013 Posts: 34
|
Posted: Thu 30 Jan '14 5:49 Post subject: Access forbidden issues (LocationMatch config problem?) |
|
|
So I know this kinda relates to the way XAMPP sets this stuff up, but what I want to figure out is why (even when using localhost or 127.0.0.1 on the server's web browser) am I told I cannot access the xampp admin panel? It should however be noted I am not greeted with the 'XAMPP Security Concept' page, I instead get this:
Quote: | 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
localhost
Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 |
I am using the default LocationMatch as seen here:
Code: | <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch> |
A final thing I want to make everyone aware of is that what I am actually trying to do, is make the xampp/htdocs folder accessible via another port, so that I have the panel there as/when I need it. I do not want port 80 to serve the admin panel though. But this problem only occurs when I use the custom port which I've got configured via a vHost to access the admin panel. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 30 Jan '14 22:31 Post subject: |
|
|
First consult your access and your error log to see which IP you are using to access that location.
Did you set up 2 vhosts? One for the default content on port 80 and the other vhost with the other port for xampp panel? |
|
Back to top |
|
Express
Joined: 07 Jan 2013 Posts: 34
|
Posted: Fri 31 Jan '14 23:13 Post subject: |
|
|
At least based on what I type in the browser it should be localhost or 127.0.0.1 - I tried both. I will check however and edit this post.
Yes, there are two vhosts, they both currently point to the xampp control panel as I needed access to it whilst I couldn't get the second vhost working.
EDIT: The error message from the logs:
Quote: |
[Fri Jan 31 22:21:48.508584 2014] [authz_core:error] [pid 5924:tid 1708] [client ::1:53468] AH01630: client denied by server configuration: C:/xampp/apache/
[Fri Jan 31 22:21:48.567639 2014] [authz_core:error] [pid 5924:tid 1708] [client ::1:53468] AH01630: client denied by server configuration: C:/xampp/apache/favicon.ico
|
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Mon 03 Feb '14 20:13 Post subject: |
|
|
The error log is telling me your configuration is causing Apache to look for the document/s in C:/xampp/apache/. Not knowing xampp, is that really where Apache should be looking?
And since this is 2.4, it is best to stick to 2.4s style of access. So instead of;
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
Just use
Require ip ::1 127.0.0.0/8 etc. |
|
Back to top |
|
Express
Joined: 07 Jan 2013 Posts: 34
|
Posted: Sun 09 Feb '14 16:39 Post subject: |
|
|
C:\xampp\apache is indeed where it is configured to look at and where it should be looking.
The access list is actually a default one provided in the XAMPP install, I never wrote that myself - which further adds to my lack of understanding as to why it doesn't work. |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Mon 10 Feb '14 16:56 Post subject: |
|
|
Are you sure that c:\xampp\apache is the path where webpage files are placed ? Isn't c:\xampp\www or c:\xampp\apache\apache_ver\htdocs ? |
|
Back to top |
|