Page 1 of 1

How to access XAMPP from external adress

PostPosted: 15. May 2009 18:02
by madalin7
Hi

I have ubuntu installed on my server and XAMPP 1.7. Everything works for localhost address I can access XAMPP but from exernal address(81.196.40.100/xampp) i'll get the folowing error message:

New XAMPP security concept:

Access to the requested directory is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

here are the contents of httpd-xampp.conf:

# New XAMPP security concept
#
<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 \
81.196.40.94/32
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>


ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:29:f1:d2:c4
inet addr:81.196.40.100 Bcast:81.196.40.127 Mask:255.255.255.192
inet6 addr: fe80::201:29ff:fef1:d2c4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:84631 errors:0 dropped:0 overruns:0 frame:0
TX packets:31805 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34777299 (34.7 MB) TX bytes:6066076 (6.0 MB)
Interrupt:17 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2168 errors:0 dropped:0 overruns:0 frame:0
TX packets:2168 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:790484 (790.4 KB) TX bytes:790484 (790.4 KB)

if someone could help me.......10x

Re: How to access XAMPP from external adress

PostPosted: 27. May 2009 14:51
by jerrymannel
Try changing the <LocationMatch> section to

<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>

:). It worked for me ..

Re: How to access XAMPP from external adress

PostPosted: 16. August 2009 21:15
by Eliminated
I just tried this, and it still doesn't work.

Please help me,

Thank's in advance,

James

Re: How to access XAMPP from external adress

PostPosted: 18. October 2009 20:40
by ddobbins
Add your server IP address (may be your modem address from your ISP) to the section on "new security concept". I don't yet know what this syntax is, but this works for me. It seems more appropriate than allowing ALL.

Allow from ::1 127.0.0.0/8 \
::1 xxx.xxx.xxx.xxx/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

Re: How to access XAMPP from external adress

PostPosted: 09. December 2009 20:04
by Leonid Barinshteyn
it also works if you keep ip addresses on one line like this
Code: Select all
Allow from ::1 xxx.x.x.x/8 xx.xxx.xxx.xx/8 xx.xxx.xxx.xxx/8 \

try restarting apache after the adding new ips
Code: Select all
/opt/lampp/lampp restart

Re: How to access XAMPP from external adress

PostPosted: 27. December 2010 09:19
by crazydrve
I couldnt get it to work either so one thing u could try which worked for me is comment out the whole section...

#
# New XAMPP security concept
#
#<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
# Order allow,deny
# #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/HTTP_XAMPP_FORBIDDEN.html.var
#</LocationMatch>

not sure if this is safe tho...

Re: How to access XAMPP from external adress

PostPosted: 27. December 2010 12:34
by Altrea
It's a really really bad idea to comment out the whole or parts of the xampp security concept just because you have not any knowledge about all the server components.

Re: How to access XAMPP from external adress

PostPosted: 24. February 2011 12:52
by xampp reply
hey crazydrve thanks man it true....but others ideas not working for me any way thanks all :P

Re: How to access XAMPP from external adress

PostPosted: 21. July 2011 21:22
by destiny32
just enter 127.0.0.1 and not your ip or 192.168.1.X or add into host file

127.0.0.1 [ ip which you want to acces ]
127.0.0.1 etc ..

Re: How to access XAMPP from external adress

PostPosted: 11. August 2011 06:38
by vvigneshbabu
It's work for me .Put # infront of Deny for all
Thank you for alll :o :lol:

Re: How to access XAMPP from external adress

PostPosted: 14. September 2011 20:02
by JonB
@ kg4bga

Other than the fact that this is a XAMMP on LINUX discussion - your points might actually have some value (although they are flawed on Windows also).

:roll:

Re: How to access XAMPP from external adress

PostPosted: 11. October 2011 18:45
by bseitz234
Hi-

Found this thread on Google- seem to be having issues with the same thing. I'd rather not comment out this security feature, because it seems like a good idea. I've got a VPN set up on my local network, and I'd like to be able to access phpMyAdmin remotely, but using the VPN for increased security. The network router is assigning 192.168.5.100-150, and the VPN server is assigning 192.168.5.224-225.

I've included the relevant section of httpd-xampp.conf below- any insights? I thought that allowing the 192.168.5.0/8 block would give me access, but it isn't working... Thanks in advance!

-Brian

~~~

from httpd-xampp.conf:

<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 192.168.5.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>

Re: How to access XAMPP from external adress

PostPosted: 11. October 2011 19:23
by Sharley
Hello Brian,

The CIDR for your range of IP addresses
192.168.5.100 - 192.168.5.150
and
192.168.5.224 - 192.168.5.225
is
192.168.0.0/16
65536 IP addresses.

Which is covered in the default settings.

So no need to add anything and best to remove your addition back to the default.
Save the file and restart Apache.

Now you need to look elsewhere for the solution as to why you can't connect from the VPN on your LAN - perhaps DNS or some router setting - with that aspect I can't help but others who read this may be able to.

Good luck. :)

Re: How to access XAMPP from external adress

PostPosted: 11. October 2011 19:30
by bseitz234
Thanks Sharley! I thought that was the case, but hoped being more specific might help it. I'm getting the 403 error that's specified, rather than a 404, so I know I'm getting the right machine; just can't figure out where the permissions error is coming from...