Page 1 of 1

Ubuntu Xampp access localhost from other pc

PostPosted: 09. December 2013 13:21
by johnnemo
I am trying to access my localhost from another computer using the local IP(192.168...)

The problem is that I get access forbidden. I changed the httpd-xampp-conf and it looks like the following:

Code: Select all
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-st$ver-status|server-info))">

    Order deny,allow
    Allow 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>


But still no luck...Any ideas..??

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 09. December 2013 13:29
by JJ_Tagy
Your hash marks '#' aren't helping you accomplish what you are trying to do.

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 09. December 2013 13:32
by johnnemo
Do I need to delete these lines..?I just commented them in order only Allow from all being considered..

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 09. December 2013 14:06
by JJ_Tagy
Looks like you edited your post as I was posting - it looks different for some reason. It was already allowing 192.168 addresses in the original.

From a security perspective, you should leave in the deny from all and then allow your ip range.

Your first line is messed up, btw. That is probably why it is ignoring your configuration.

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 09. December 2013 14:18
by johnnemo
I changed the first line..There was data missing..I haven t configured anything else...I can t understand why I get permission denied even if I return the configuration of httpd-xampp-conf to default...

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 09. December 2013 16:44
by Altrea
Disabling the whole security concept is a really good idea... ... NOT.
I'm surprised that you got any helpful replies at all after throwing all security overboard.

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 10. December 2013 00:37
by johnnemo
johnnemo wrote:What should I do..?i need to test my app from other sources..What is the ideal configuration to do that...

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 10. December 2013 01:20
by JJ_Tagy
XAMPP is already set up to allow you to test your files in the existing environment - especially a typical local network. If you are trying to modify the security settings, then you are already doing something wrong to begin with.

Re: Ubuntu Xampp access localhost from other pc

PostPosted: 10. December 2013 11:46
by johnnemo
I just reinstalled xampp and it works fine....Thanks for your replies!!!