Unable to access sub-directory

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

Unable to access sub-directory

Postby RSmithBothell » 25. February 2016 02:05

I'm having the same issue with XAMPP, though no re-install.

I've done a lot of development on my local box, accessing my project via http://localhost/paths/public_html/index.html
And it's worked fine.
Now I have to do a show and tell for the boss so w/in our secure network I want him to be able to access my box via IP.

I've opened up httpd-xampp.conf,
Code: Select all
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
#        Require local
         Allow from all
   ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

</LocationMatch>
so my index.html page gets loaded okay, and access.log shows it accessing the other pages just right
Code: Select all
10.139.164.191 - - [24/Feb/2016:16:16:43 -0800] "GET /Cell_Modems/public_html/ HTTP/1.1" 200 1098 "http://10.139.164.191/Cell_Modems/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [24/Feb/2016:16:16:43 -0800] "GET /Cell_Modems/CSS/PopulateTables.css HTTP/1.1" 200 7393 "http://10.139.164.191/Cell_Modems/public_html/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [24/Feb/2016:16:16:43 -0800] "GET /Cell_Modems/javascripts/script.js HTTP/1.1" 200 14265 "http://10.139.164.191/Cell_Modems/public_html/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [24/Feb/2016:16:16:43 -0800] "GET /Cell_Modems/public_html/MarginLeft/left_margin.html HTTP/1.1" 200 2366 "http://10.139.164.191/Cell_Modems/public_html/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [24/Feb/2016:16:16:43 -0800] "GET /Cell_Modems/public_html/MarginRight/right_margin.html HTTP/1.1" 200 8470 "http://10.139.164.191/Cell_Modems/public_html/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [24/Feb/2016:16:16:43 -0800] "GET /Cell_Modems/public_html/view_forms/modem_config_and_activity_table.html HTTP/1.1" 200 8182 "http://10.139.164.191/Cell_Modems/public_html/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
10.139.164.191 - - [24/Feb/2016:16:16:43 -0800] "GET /favicon.ico HTTP/1.1" 200 30894 "http://10.139.164.191/Cell_Modems/public_html/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"

but the jQuery care of
Code: Select all
<script type="text/javascript">
      $(document).ready(Main);
    </script>

apparently isn't getting kicked off, instead all I get is a bare HTML page.

If I made a simple PHP page and http://myip/path/PHP/, that page works fine.

I'm stuck.
RSmithBothell
 
Posts: 3
Joined: 25. September 2014 01:35
Operating System: OS X 10.8 and it's 1.8.2-5

Re: Unable to access sub-directory

Postby Altrea » 25. February 2016 10:30

RSmithBothell wrote:I've opened up httpd-xampp.conf,
Code: Select all
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
#        Require local
         Allow from all
   ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

</LocationMatch>

Why? The security concept only covers very specific ressources. Your own folders should not be affected.

RSmithBothell wrote:but the jQuery care of
Code: Select all
<script type="text/javascript">
      $(document).ready(Main);
    </script>

apparently isn't getting kicked off, instead all I get is a bare HTML page.

JavaScript is processed by the browser not the server. Apache don't touch any JavaScript code.
So this is an application error, not an XAMPP error.
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: 8287
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 61 guests