Page 1 of 1

Unable to access sub-directory

PostPosted: 25. February 2016 02:05
by RSmithBothell
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.

Re: Unable to access sub-directory

PostPosted: 25. February 2016 10:30
by Altrea
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.